diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 63001341..00000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,64 +0,0 @@ -# Contributing - -We want to make contributing to this project as easy and transparent as possible and we are grateful for, any contributions made by the community. - -## Reporting Issues and Asking Questions - -Before opening an issue, please search the [issue tracker](https://github.com/GeekyAnts/flutter-starter/issues) to make sure your issue hasn't already been reported. - -### Bugs and Improvements - -We use the issue tracker to keep track of bugs and improvements to Flutter Starter itself, its examples, and the documentation. We encourage you to open issues to discuss improvements, architecture, theory, internal implementation, etc. If a topic has been discussed before, we will ask you to join the previous discussion. - -## Development - -Visit the [issue tracker](https://github.com/GeekyAnts/flutter-starter/issues) to find a list of open issues that need attention. - -### Building - -Go to [Flutter Docs](https://flutter.dev/docs/get-started/install) and install Flutter in your system. - -Go to our [github repo](https://github.com/GeekyAnts/flutter-starter) and create a template. - -[`https://github.com/GeekyAnts/flutter-starter/generate`](https://github.com/GeekyAnts/flutter-starter/generate) - -To run the project, run: - -```sh -bash run_script.sh -``` - -### Add Test Files - -To add test files go to each folder shared, api-sdk and app there will be test folder add the test files there and write the test cases. - -To see how to write test cases check out the [official documents](https://flutter.dev/docs/cookbook/testing/unit/introduction). - - -### Docs - -Improvements to the documentation are always welcome. You can find them in the [`flutter-starter.github.io`](https://github.com/flutter-starter/flutter-starter.github.io) repository. We use [Docusaurus](https://docusaurus.io/) to build our documentation website. The website is published automatically whenever the `master` branch is updated. - -### Examples - -Flutter Starter comes with [`HackerNews App`](https://flutter-starter.github.io/docs/hacker-news-example), [`GithubRepo List App`](https://flutter-starter.github.io/docs/github-repo-list-example) and [`Weather App`](https://flutter-starter.github.io/docs/weather-app-example) as examples to demonstrate various concepts and best practices. - -When adding a new example, please adhere to the style and format of the existing examples, and try to reuse as much code as possible. - -### Sending a Pull Request - -For non-trivial changes, please open an issue with a proposal for a new feature or refactoring before starting on the work. We don't want you to waste your efforts on a pull request that we won't want to accept. - -In general, the contribution workflow looks like this: - -- Open a new issue in the [Issue tracker](https://github.com/GeekyAnts/flutter-starter/issues). -- Fork the repo. -- Create a new feature branch based off the `master` branch. -- Make sure all tests pass and there are no linting errors. -- Submit a pull request, referencing any issues it addresses. - -Please try to keep your pull request focused in scope and avoid including unrelated commits. - -After you have submitted your pull request, we'll try to get back to you as soon as possible. We may suggest some changes or improvements. - -Thank you for contributing! diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 9f3564ef..00000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 GeekyAnts - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md index 583e492b..fe19573f 100644 --- a/README.md +++ b/README.md @@ -1,105 +1,111 @@ -# Flutter Starter - -[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-) - +### Flutter Starter -## Introduction +We wanted to take Flutter a step further and accelerate the process of building production-level apps. Presenting our solution- Flutter Starter! -We wanted to take Flutter a step further and accelerate the process of building production-level apps. Presenting our solution- [Flutter Starter](https://flutter-starter.github.io/)! +![demo gif](./flutter_starter.gif) -

- -

+## Introduction: -Flutter Starter, as the name suggests, is a starter kit for Flutter that helps you bootstrap projects with all the essential modules like **State Management, API calls, Style Guide,** etc. It helps you build production ready apps in a jiffy. Handle everything at one place so you don't have to rewrite code. +Flutter Starter, a starter kit for Flutter that helps you bootstrap projects with all the essential modules like **State Management, API calls, Style Guide, Localisation, Routes** etc. It helps you build production ready apps in a jiffy. It handles everything at one place so you don't have to rewrite code. -## Motivation +### Tech Stack -Flutter gives us a simple counter app on installation which works if you are just starting out. However, while building a production-level app, we need state-management, API calls, Styleguide and common widgets. We frequently repeat this code in every project. +| Library | Category | Version | Description | +| -------------------- | -------------------- | ------- | ------------------------------------------------------------------------------------------------------------- | +| Flutter | Mobile Framework | 3.0.1 | A framework for building multi-platform applications from a single codebase. | +| Flutter Localization | Internationalization | 0.17.0 | Localizations for the Flutter library. | +| BLoC | State Management | 8.1.0 | This design pattern helps to separate presentation from business logic | +| Flutter Bloc | State Management | 8.1.1 | Makes it easy to implement the BLoC design pattern | +| Http | Api Service | 0.13.5 | A composable, multi-platform, Future-based API for HTTP requests. | +| Http Interceptor | Intercepting | 1.0.2 | A simple plugin that allows you to intercept request and response objects and modify them if desired. | +| Shared Preferences | Storage | 2.0.12 | Wraps platform-specific persistent storage for simple data. | +| Dio | State Management | 4.0.6 | A powerful Http client for Dart. | +| Retrofit | Dio client Generator | 3.0.1+1 | A dio client generator using source_gen. | +| Graphql | Api Service | 5.1.0 | A GraphQL client for Flutter. | +| Go Router | Routing | 4.4.1 | A declarative router for Flutter based on Navigation 2 supporting deep linking. | +| Bloc Test | Testing | 9.1.0 | A testing library which makes it easy to test blocs. | +| Mocktail | Testing | 0.3.0 | A Dart mock library which simplifies mocking with null safety support and no manual mocks or code generation. | -Flutter Starter is based on the **DRY principle. Don't Repeat Yourself** is a programming principle that is aimed at reducing repetition and redundancy. +## What does Flutter Starter provide : ->:bulb: The **DRY principle** states that "Every piece of knowledge must have a single, unambiguous, authoritative representation within a system". +For the initial release flutter starter provides: -Why is this useful? Applying the DRY principle helps code maintainability, improves development efficiency and much more! +1. **Api- Services** There are three api-services **dio**, **http** and **graphql** that have been set up if you want to provide any network method calls. We have set up an example of http in the application for signup/ login purposes but you can choose whatever you are comfortable with. -## Features + - **Dio** : It is a powerful Http client for Dart, which supports Interceptors, Global configuration, FormData, Request Cancellation, File downloading, Timeout etc. [here](lib/api_sdk/dio) -* **Folder Structure:** Flutter Starter comes with a well-defined folder structure. Devs can easily navigate it and add files where necessary. + - **Http** : It is a composable, Future-based library for making HTTP requests that contains a set of high-level functions and classes that make it easy to consume HTTP resources. [here](lib/api_sdk/http) -* **Style Guide:** This kit helps you to build a Style Guide for your app. You can add your image and font assets, splash screen, color constants and theme data. These are available for use wherever required in your project. + - **Graphql** : It is a stand-alone GraphQL client for Flutter, bringing all the features from a modern GraphQL client to one easy to use package. [here](lib/api_sdk/graphql) -* **API Calls:** The starter kit includes all the files you need for API handling. You can choose from [REST](https://restfulapi.net/), [GraphQL](https://graphql.org/) and [Firebase](https://firebase.google.com/) depending on your project. +2. **State Management** For state management in the application, BLoC has been set up for basic authentication and updating themes in the app. -* **State Management:** Flutter Starter contains all the state management files, models and repositories for your app. We will use [Bloc](https://pub.dev/packages/bloc) for state management. + - **BLoC :** Flutter bloc is quite **simple** and easy to understand, it has a very good documentation with tons of examples and also, is one of the most used in the flutter community. [here](lib/shared/bloc) -* **Routers & Dependencies:** This kit allows you to quickly add routers for your app screens. Dependencies can also be added to your app by simply copy-pasting the install version from [pub.dev](https://pub.dev/) into the designated file. +3. **Basic Set up** -* **Testing & Deployment:** Lastly, you can test and deploy your app smoothly using Flutter Starter! Go to the test folder, add your test files and start writing test cases. Check out the [Android](https://flutter.dev/docs/deployment/android) or [iOS](https://flutter.dev/docs/deployment/ios) pages to deploy your app. + - **Localisation**: If you build an app for different markets, you will most likely need to support multiple languages for your end-users, hence we have added localisation as a basic set up. Right now, 3 languages have been added in our localisation folder but you can add more according to your use case: English, Spanish, French. [here](lib/l10n) -## Installing & Usage + - **Routing** : An app has to display multiple screens depending upon the developer's needs. Hence we need different set of routes to display those screens. We have set up a basic file (routes.dart) in which we are demonstrating how you can set-up routes of your application. We have added **go_router** as a dependency for routing so that same application can be run on flutter_web too, but if you want you can use basic routing as well by just uncommenting the code and using it as per requirements. [here](lib/routes) -Go to [Flutter](https://flutter.dev/docs/get-started/install) and install Flutter on your system. Proceed to our [Github repository](https://github.com/GeekyAnts/flutter-starter) and create a template. + - **Themes** : Theme of the whole application will be derived from here. A basic theme set up including interchanging of light and dark theme will be there. You can add n amount of colours, font sizes, text theme, etc to maintain the theme of your application. [here](lib/themes) -To run the project, run: -``` -bash run_script.sh -``` +4. **UI Screens** + + - **Sign In :** This will be the landing page of our application, for someone who already has an account registered can login directly. [here](lib/screens/login/login_screen.dart) ->:bulb: You can build apps with Flutter using any text editor combined with our command-line tools. We use VS Code since it is lightweight. + - **Sign Up :** You can register yourself here. [here](lib/screens/signup/signup_screen.dart) -## Examples + - **Home :** It will contain a drawer which will have basic user information who has logged in and a switch to change between light and dark theme. [here](lib/screens/home/home.dart) -Here are some of the example apps made using Flutter Starter: +5. **Test Cases** We have also introduced test cases in the base setup so that you can validate your UI, business logic, functionality, etc. We have set up : -- [HackerNews App](https://flutter-starter.github.io/docs/hacker-news-example) + - **Unit Test Cases :** Unit tests are handy for verifying the behaviour of a single function, method, or class. [here](./test/bloc/) + - **Integration Test Cases :** They test how individual pieces work together as a whole, or capture the performance of an application running on a real device. [here](./integration_test/app_test.dart) + - **Widget Test Cases :** They test the UI components. It is used to test a single widget. The main goal of widget testing is to check whether the widget works as expected. [here](./test/screens/) -

- -

+## What will Flutter Starter provide in later releases : +For second release we are planning to introduce one more api-service and command line interface. -- [GithubRepo List App](https://flutter-starter.github.io/docs/github-repo-list-example) +1. **Api-Services** : -

- -

+ - **Firebase** : We will be providing all social authentications(Google/Twitter/Facebook etc) to the developer using firebase services. -- [Weather App](https://flutter-starter.github.io/docs/weather-app-example) +2. **State Management** : -

- -

+ - **Provider/Riverpod** : We will be providing support for Provider/Riverpod state management templates too. -## Tech Stack +3. **Command Line Interface** : We are aiming to provide a command line interface, so that you can easily create a project using flutter starter as the base template by just writing a command in the terminal. -Flutter, Firebase, GraphQL, REST and Bloc. +4. **Example Templates** : We will creating multiple apps template on how to use this boilerplate. -## Naming Conventions +## How to use flutter starter: -* **Variables:** camelCase -* **Classes:** PascalCase -* **Files:** snake_case +To get started with flutter starter: -## Build Status -[Check out our roadmap here.](https://trello.com/b/wxSMZP1H/flutter-starter) +[Steps to get started](./use_flutter_starter.md) +## Using Flutter Starter CLI -## Contributors +- Flutter Starter CLI is written in the Dart programming language. It is a very useful tool that provides commands for the ease of setting up a Flutter project from scratch. +- While working with the Flutter projects we have to write the same repetitive code multiple times but using this CLI, we can create a Flutter template on the fly. +- Also, the basic structure of all the tests in Flutter is the same. So this CLI also provides a basic starter pack for the Flutter test as well. - - - - - - - - -

Sumant Raj

💻

madhav23bansal

💻
+Activate globally via: + +```sh +dart pub global activate flutter_starter_cli +``` - - - +```sh +# To create project +$ flutter_starter_cli create + +# Then follow instructions +``` + +Read more about [`Flutter Starter CLI`](https://pub.dev/packages/flutter_starter_cli). ## How to Contribute @@ -108,4 +114,5 @@ Thank you for your interest in contributing to Flutter Starter! We are lucky to ## License Licensed under the MIT License, Copyright © 2020 GeekyAnts. + See [LICENSE](https://github.com/GeekyAnts/flutter-starter/blob/master/LICENSE) for more information. diff --git a/app/analysis_options.yaml b/analysis_options.yaml similarity index 100% rename from app/analysis_options.yaml rename to analysis_options.yaml diff --git a/examples/book-store-firebase/app/android/.gitignore b/android/.gitignore similarity index 100% rename from examples/book-store-firebase/app/android/.gitignore rename to android/.gitignore diff --git a/examples/weather-app/app/android/app/build.gradle b/android/app/build.gradle similarity index 85% rename from examples/weather-app/app/android/app/build.gradle rename to android/app/build.gradle index 2a6af6eb..3380d1a8 100644 --- a/examples/weather-app/app/android/app/build.gradle +++ b/android/app/build.gradle @@ -27,6 +27,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { compileSdkVersion flutter.compileSdkVersion + ndkVersion flutter.ndkVersion compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -43,8 +44,10 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.app" - minSdkVersion flutter.minSdkVersion + applicationId "com.example.flutter_starter" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. + minSdkVersion 19 targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName diff --git a/app/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml similarity index 52% rename from app/android/app/src/debug/AndroidManifest.xml rename to android/app/src/debug/AndroidManifest.xml index 99f406bd..2080ec24 100644 --- a/app/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,6 +1,7 @@ - diff --git a/examples/github-repository-list/app/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml similarity index 95% rename from examples/github-repository-list/app/android/app/src/main/AndroidManifest.xml rename to android/app/src/main/AndroidManifest.xml index 3f2d4034..e1d8aeec 100644 --- a/examples/github-repository-list/app/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,7 +1,7 @@ + package="com.example.flutter_starter"> diff --git a/examples/github-repository-list/app/android/build.gradle b/android/build.gradle similarity index 90% rename from examples/github-repository-list/app/android/build.gradle rename to android/build.gradle index 4256f917..83ae2200 100644 --- a/examples/github-repository-list/app/android/build.gradle +++ b/android/build.gradle @@ -6,7 +6,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:4.1.0' + classpath 'com.android.tools.build:gradle:7.1.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/examples/book-store-firebase/app/android/gradle.properties b/android/gradle.properties similarity index 100% rename from examples/book-store-firebase/app/android/gradle.properties rename to android/gradle.properties diff --git a/examples/weather-app/app/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties similarity index 93% rename from examples/weather-app/app/android/gradle/wrapper/gradle-wrapper.properties rename to android/gradle/wrapper/gradle-wrapper.properties index bc6a58af..cc5527d7 100644 --- a/examples/weather-app/app/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip diff --git a/app/android/settings.gradle b/android/settings.gradle similarity index 100% rename from app/android/settings.gradle rename to android/settings.gradle diff --git a/api_sdk/.gitignore b/api_sdk/.gitignore deleted file mode 100644 index 9d532b18..00000000 --- a/api_sdk/.gitignore +++ /dev/null @@ -1,41 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json diff --git a/api_sdk/.metadata b/api_sdk/.metadata deleted file mode 100644 index 107fcb7b..00000000 --- a/api_sdk/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 8874f21e79d7ec66d0457c7ab338348e31b17f1d - channel: stable - -project_type: app diff --git a/api_sdk/README.md b/api_sdk/README.md deleted file mode 100644 index 39e5a3fa..00000000 --- a/api_sdk/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# api_sdk - -A new Flutter project. - -## Getting Started - -This project is a starting point for a Flutter application. - -A few resources to get you started if this is your first Flutter project: - -- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) - -For help getting started with Flutter, view our -[online documentation](https://flutter.dev/docs), which offers tutorials, -samples, guidance on mobile development, and a full API reference. diff --git a/api_sdk/lib/api_constants.dart b/api_sdk/lib/api_constants.dart deleted file mode 100644 index 6834526a..00000000 --- a/api_sdk/lib/api_constants.dart +++ /dev/null @@ -1,32 +0,0 @@ -//For the graphql. -import 'package:graphql/client.dart'; - -Map apiConstants = {"auth": "https://reqres.in/api"}; -GraphQLCache cache = GraphQLCache( - dataIdFromObject: (object) { - if (object is Map && - object.containsKey('__typename') && - object.containsKey('id')) { - return "${object['__typename']}/${object['id']}"; - } - return null; - }, -); - -//For the rest. -GraphQLClient client() { - final HttpLink _httpLink = HttpLink( - 'https://api.github.com/graphql', - ); - - final AuthLink _authLink = AuthLink( - getToken: () => 'Bearer YOUR GITHUB ACCESS TOKEN', - ); - - final Link _link = _authLink.concat(_httpLink); - - return GraphQLClient( - cache: cache, - link: _link, - ); -} diff --git a/api_sdk/lib/firebase_method/api_handles/firebase_api.dart b/api_sdk/lib/firebase_method/api_handles/firebase_api.dart deleted file mode 100644 index 5d5f3345..00000000 --- a/api_sdk/lib/firebase_method/api_handles/firebase_api.dart +++ /dev/null @@ -1,35 +0,0 @@ -import 'package:cloud_firestore/cloud_firestore.dart'; - -class FirebaseApi { - final FirebaseFirestore _db = FirebaseFirestore.instance; - final String path; - CollectionReference ref; - - FirebaseApi(this.path) { - ref = _db.collection(path); - } - - Future addDocument(Map data) { - return ref.add(data); - } - - Future getDataCollection() { - return ref.get(); - } - - Future getDocumentById(String id) { - return ref.doc(id).get(); - } - - Future removeDocument(String id) { - return ref.doc(id).delete(); - } - - Stream streamDataCollection() { - return ref.snapshots(); - } - - Future updateDocument(Map data, String id) { - return ref.doc(id).update(data); - } -} diff --git a/api_sdk/lib/firebase_method/auth_services/firebase_auth.dart b/api_sdk/lib/firebase_method/auth_services/firebase_auth.dart deleted file mode 100644 index 5c636914..00000000 --- a/api_sdk/lib/firebase_method/auth_services/firebase_auth.dart +++ /dev/null @@ -1,105 +0,0 @@ -import 'package:firebase_auth/firebase_auth.dart'; -import 'package:shared/main.dart'; - -class AuthService { - final FirebaseAuth _auth = FirebaseAuth.instance; - String errorMessage; - - //Create User Object from Firebase User - Future getCurrentUser() async { - try { - final User user = _auth.currentUser; - if (user != null) { - String token = await user.getIdToken(); - return _userFromFirebaseUser(user, token); - } else { - return null; - } - } catch (err) { - errorMessage = getMessageFromErrorCode(err.code); - print(errorMessage); - return Future.error(errorMessage); - } - } - - //Signin With email and password - String getMessageFromErrorCode(errorCode) { - switch (errorCode) { - case "ERROR_EMAIL_ALREADY_IN_USE": - case "account-exists-with-different-credential": - case "email-already-in-use": - return "Email already used. Go to login page."; - break; - case "ERROR_WRONG_PASSWORD": - case "wrong-password": - return "Wrong email/password combination."; - break; - case "ERROR_USER_NOT_FOUND": - case "user-not-found": - return "No user found with this email. Please signUp to continue"; - break; - case "ERROR_USER_DISABLED": - case "user-disabled": - return "User disabled."; - break; - case "ERROR_TOO_MANY_REQUESTS": - case "operation-not-allowed": - return "Too many requests to log into this account."; - break; - case "ERROR_OPERATION_NOT_ALLOWED": - case "operation-not-allowed": - return "Server error, please try again later."; - break; - case "ERROR_INVALID_EMAIL": - case "invalid-email": - return "Email address is invalid."; - break; - case "ERROR_USER_NOT_FOUND": - case "user-not-found": - return "No account found with this email"; - break; - default: - return "Login failed. Please try again."; - break; - } - } - - //Register with email and password - Future registerWithEmailAndPassword(String email, String password) async { - try { - UserCredential userCredential = await _auth - .createUserWithEmailAndPassword(email: email, password: password); - String token = await userCredential.user.getIdToken(); - return _userFromFirebaseUser(userCredential.user, token); - } catch (err) { - errorMessage = getMessageFromErrorCode(err.code); - print(errorMessage); - return Future.error(errorMessage); - } - } - - Future signInWithEmailAndPassword(String email, String password) async { - try { - UserCredential userCredential = await _auth.signInWithEmailAndPassword( - email: email, password: password); - String token = await userCredential.user.getIdToken(); - return _userFromFirebaseUser(userCredential.user, token); - } catch (err) { - errorMessage = getMessageFromErrorCode(err.code); - print(errorMessage); - return Future.error(errorMessage); - } - } - - //signout - Future signOut() async { - return await _auth.signOut(); - } - - //getMessageFromErrorCode - UserFromFirebaseUser _userFromFirebaseUser(User user, token) { - return user != null - ? UserFromFirebaseUser(uid: user.uid, email: user.email, token: token) - : null; - } -} diff --git a/api_sdk/lib/graphql_method/graphql_handler.dart b/api_sdk/lib/graphql_method/graphql_handler.dart deleted file mode 100644 index 254aa60a..00000000 --- a/api_sdk/lib/graphql_method/graphql_handler.dart +++ /dev/null @@ -1,42 +0,0 @@ -import 'dart:async'; - -import 'package:api_sdk/graphql_method/graphql_operation/mutations/mutations.dart' - as mutations; -import 'package:api_sdk/graphql_method/graphql_operation/queries/readRepositories.dart' - as queries; -import 'package:flutter/widgets.dart'; -import 'package:gql/language.dart'; -import 'package:graphql/client.dart'; - -class GraphqlQlHandler { - final GraphQLClient client; - - GraphqlQlHandler({@required this.client}) : assert(client != null); - - Future getRepositories(int numOfRepositories) async { - final WatchQueryOptions _options = WatchQueryOptions( - document: parseString(queries.readRepositories), - variables: { - 'nRepositories': numOfRepositories, - }, - pollInterval: Duration(seconds: 4), - fetchResults: true, - ); - - return await client.query(_options); - } - - Future toggleRepoStar(dynamic repo) async { - var document = - repo.viewerHasStarred ? mutations.removeStar : mutations.addStar; - - final MutationOptions _options = MutationOptions( - document: parseString(document), - variables: { - 'starrableId': repo.id, - }, - ); - - return await client.mutate(_options); - } -} diff --git a/api_sdk/lib/graphql_method/graphql_operation/mutations/add_star.dart b/api_sdk/lib/graphql_method/graphql_operation/mutations/add_star.dart deleted file mode 100644 index aabb7900..00000000 --- a/api_sdk/lib/graphql_method/graphql_operation/mutations/add_star.dart +++ /dev/null @@ -1,9 +0,0 @@ -const String addStar = r''' - mutation AddStar($starrableId: ID!) { - action: addStar(input: {starrableId: $starrableId}) { - starrable { - viewerHasStarred - } - } - } -'''; diff --git a/api_sdk/lib/graphql_method/graphql_operation/mutations/mutations.dart b/api_sdk/lib/graphql_method/graphql_operation/mutations/mutations.dart deleted file mode 100644 index 79cead37..00000000 --- a/api_sdk/lib/graphql_method/graphql_operation/mutations/mutations.dart +++ /dev/null @@ -1,2 +0,0 @@ -export './add_star.dart'; -export './remove_star.dart'; diff --git a/api_sdk/lib/graphql_method/graphql_operation/mutations/remove_star.dart b/api_sdk/lib/graphql_method/graphql_operation/mutations/remove_star.dart deleted file mode 100644 index 69f33295..00000000 --- a/api_sdk/lib/graphql_method/graphql_operation/mutations/remove_star.dart +++ /dev/null @@ -1,9 +0,0 @@ -const String removeStar = r''' - mutation RemoveStar($starrableId: ID!) { - action: removeStar(input: {starrableId: $starrableId}) { - starrable { - viewerHasStarred - } - } - } -'''; diff --git a/api_sdk/lib/graphql_method/graphql_operation/queries/readRepositories.dart b/api_sdk/lib/graphql_method/graphql_operation/queries/readRepositories.dart deleted file mode 100644 index 8eceea11..00000000 --- a/api_sdk/lib/graphql_method/graphql_operation/queries/readRepositories.dart +++ /dev/null @@ -1,23 +0,0 @@ -const String readRepositories = r''' - query ReadRepositories($nRepositories: Int!) { - viewer { - repositories(last: $nRepositories) { - nodes { - __typename - id - name - viewerHasStarred - } - } - } - } -'''; - -const String testSubscription = r''' - subscription test { - deviceChanged(id: 2) { - id - name - } - } -'''; diff --git a/api_sdk/lib/main.dart b/api_sdk/lib/main.dart deleted file mode 100644 index f25913fe..00000000 --- a/api_sdk/lib/main.dart +++ /dev/null @@ -1,30 +0,0 @@ -import 'package:api_sdk/api_constants.dart'; -import 'package:api_sdk/graphql_method/graphql_handler.dart'; -import 'package:api_sdk/rest/rest_api_handler_data.dart'; - -class ApiSdk { - static loginWithEmailAndPassword(dynamic body) async { - final response = await RestApiHandlerData.postData( - '${apiConstants["auth"]}/login', body); - return response; - } - - static signUpWithEmailAndPassword(dynamic body) async { - final response = await RestApiHandlerData.postData( - '${apiConstants["auth"]}/register', body); - return response; - } - - static getUserData(int id) async { - final response = - await RestApiHandlerData.getData('${apiConstants["auth"]}/users/$id'); - return response; - } - - static fetchGithubRepoGraphQl(numOfRepositories) async { - final GraphqlQlHandler githubRepository = - GraphqlQlHandler(client: client()); - final response = await githubRepository.getRepositories(numOfRepositories); - return response; - } -} diff --git a/api_sdk/lib/rest/api_helpers/api_base_helper.dart b/api_sdk/lib/rest/api_helpers/api_base_helper.dart deleted file mode 100644 index 26fc9682..00000000 --- a/api_sdk/lib/rest/api_helpers/api_base_helper.dart +++ /dev/null @@ -1,72 +0,0 @@ -import 'dart:convert'; -import 'dart:io'; - -import 'package:http/http.dart' as http; - -import 'api_exception.dart'; - -dynamic _returnResponse(http.Response response) { - switch (response.statusCode) { - case 200: - var responseJson = json.decode(response.body.toString()); - return responseJson; - case 400: - return json.decode(response.body.toString()); - case 401: - case 403: - return json.decode(response.body.toString()); - case 500: - default: - return FetchDataException( - 'Error occured while Communication with Server with StatusCode : ${response.statusCode}'); - } -} - -class ApiBaseHelper { - Future delete(String url) async { - var apiResponse; - try { - final response = await http.delete(Uri.parse(url)); - apiResponse = _returnResponse(response); - } on SocketException { - throw FetchDataException('No Internet connection'); - } - - return apiResponse; - } - - Future get(String url) async { - var responseJson; - try { - final response = await http.get(Uri.parse(url)); - responseJson = _returnResponse(response); - } on SocketException { - throw FetchDataException('No Internet connection'); - } - return responseJson; - } - - Future post(String url, dynamic body) async { - var responseJson; - try { - final response = await http.post(Uri.parse(url), body: body); - responseJson = _returnResponse(response); - } on SocketException { - throw FetchDataException('No Internet connection'); - } - - return responseJson; - } - - Future put(String url, dynamic body) async { - var responseJson; - try { - final response = await http.put(Uri.parse(url), body: body); - responseJson = _returnResponse(response); - } on SocketException { - throw FetchDataException('No Internet connection'); - } - - return responseJson; - } -} diff --git a/api_sdk/lib/rest/api_helpers/api_exception.dart b/api_sdk/lib/rest/api_helpers/api_exception.dart deleted file mode 100644 index acdc758e..00000000 --- a/api_sdk/lib/rest/api_helpers/api_exception.dart +++ /dev/null @@ -1,27 +0,0 @@ -class AppException implements Exception { - final _message; - final _prefix; - - AppException([this._message, this._prefix]); - - String toString() { - return "$_prefix$_message"; - } -} - -class FetchDataException extends AppException { - FetchDataException([String message]) - : super(message, "Error During Communication: "); -} - -class BadRequestException extends AppException { - BadRequestException([message]) : super(message, "Invalid Request: "); -} - -class UnauthorisedException extends AppException { - UnauthorisedException([message]) : super(message, "Unauthorised: "); -} - -class InvalidInputException extends AppException { - InvalidInputException([String message]) : super(message, "Invalid Input: "); -} diff --git a/api_sdk/lib/rest/rest_api_handler_data.dart b/api_sdk/lib/rest/rest_api_handler_data.dart deleted file mode 100644 index 8dd7e51b..00000000 --- a/api_sdk/lib/rest/rest_api_handler_data.dart +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:api_sdk/rest/api_helpers/api_base_helper.dart'; - -class RestApiHandlerData { - static ApiBaseHelper _apiBaseHelper = ApiBaseHelper(); - static getData(String path) async { - final response = await _apiBaseHelper.get('$path'); - return response; - } - - static postData(String path, dynamic body) async { - final response = await _apiBaseHelper.post('$path', body); - return response; - } -} diff --git a/api_sdk/pubspec.lock b/api_sdk/pubspec.lock deleted file mode 100644 index 8b5a95a4..00000000 --- a/api_sdk/pubspec.lock +++ /dev/null @@ -1,670 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - args: - dependency: transitive - description: - name: args - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.0" - async: - dependency: transitive - description: - name: async - url: "https://pub.dartlang.org" - source: hosted - version: "2.8.2" - bloc: - dependency: transitive - description: - name: bloc - url: "https://pub.dartlang.org" - source: hosted - version: "8.0.2" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - characters: - dependency: transitive - description: - name: characters - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - clock: - dependency: transitive - description: - name: clock - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - cloud_firestore: - dependency: "direct main" - description: - name: cloud_firestore - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.7" - cloud_firestore_platform_interface: - dependency: transitive - description: - name: cloud_firestore_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "5.4.12" - cloud_firestore_web: - dependency: transitive - description: - name: cloud_firestore_web - url: "https://pub.dartlang.org" - source: hosted - version: "2.6.7" - collection: - dependency: transitive - description: - name: collection - url: "https://pub.dartlang.org" - source: hosted - version: "1.15.0" - connectivity_plus: - dependency: transitive - description: - name: connectivity_plus - url: "https://pub.dartlang.org" - source: hosted - version: "1.4.0" - connectivity_plus_linux: - dependency: transitive - description: - name: connectivity_plus_linux - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_macos: - dependency: transitive - description: - name: connectivity_plus_macos - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.1" - connectivity_plus_platform_interface: - dependency: transitive - description: - name: connectivity_plus_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_web: - dependency: transitive - description: - name: connectivity_plus_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_windows: - dependency: transitive - description: - name: connectivity_plus_windows - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - crypto: - dependency: transitive - description: - name: crypto - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.4" - dbus: - dependency: transitive - description: - name: dbus - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.8" - equatable: - dependency: "direct main" - description: - name: equatable - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - fake_async: - dependency: transitive - description: - name: fake_async - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - ffi: - dependency: transitive - description: - name: ffi - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.2" - file: - dependency: transitive - description: - name: file - url: "https://pub.dartlang.org" - source: hosted - version: "6.1.2" - firebase_auth: - dependency: "direct main" - description: - name: firebase_auth - url: "https://pub.dartlang.org" - source: hosted - version: "3.3.6" - firebase_auth_platform_interface: - dependency: transitive - description: - name: firebase_auth_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "6.1.11" - firebase_auth_web: - dependency: transitive - description: - name: firebase_auth_web - url: "https://pub.dartlang.org" - source: hosted - version: "3.3.7" - firebase_core: - dependency: "direct main" - description: - name: firebase_core - url: "https://pub.dartlang.org" - source: hosted - version: "1.12.0" - firebase_core_platform_interface: - dependency: transitive - description: - name: firebase_core_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "4.2.4" - firebase_core_web: - dependency: transitive - description: - name: firebase_core_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.5.4" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_bloc: - dependency: transitive - description: - name: flutter_bloc - url: "https://pub.dartlang.org" - source: hosted - version: "8.0.1" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - freezed_annotation: - dependency: "direct main" - description: - name: freezed_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - gql: - dependency: "direct main" - description: - name: gql - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.0" - gql_dedupe_link: - dependency: transitive - description: - name: gql_dedupe_link - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - gql_error_link: - dependency: transitive - description: - name: gql_error_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - gql_exec: - dependency: transitive - description: - name: gql_exec - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.0" - gql_http_link: - dependency: transitive - description: - name: gql_http_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.0" - gql_link: - dependency: transitive - description: - name: gql_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.0" - gql_transform_link: - dependency: transitive - description: - name: gql_transform_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - graphql: - dependency: "direct main" - description: - name: graphql - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.1-beta.5" - graphql_flutter: - dependency: "direct main" - description: - name: graphql_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.0" - hive: - dependency: transitive - description: - name: hive - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - http: - dependency: "direct main" - description: - name: http - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.4" - http_parser: - dependency: transitive - description: - name: http_parser - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.0" - intl: - dependency: transitive - description: - name: intl - url: "https://pub.dartlang.org" - source: hosted - version: "0.17.0" - js: - dependency: transitive - description: - name: js - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.3" - json_annotation: - dependency: transitive - description: - name: json_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "4.4.0" - matcher: - dependency: transitive - description: - name: matcher - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.11" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.3" - meta: - dependency: transitive - description: - name: meta - url: "https://pub.dartlang.org" - source: hosted - version: "1.7.0" - nested: - dependency: transitive - description: - name: nested - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - nm: - dependency: transitive - description: - name: nm - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.3" - normalize: - dependency: transitive - description: - name: normalize - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.0" - path: - dependency: transitive - description: - name: path - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0" - path_provider: - dependency: transitive - description: - name: path_provider - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.8" - path_provider_android: - dependency: transitive - description: - name: path_provider_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.11" - path_provider_ios: - dependency: transitive - description: - name: path_provider_ios - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.7" - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.5" - path_provider_macos: - dependency: transitive - description: - name: path_provider_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - petitparser: - dependency: transitive - description: - name: petitparser - url: "https://pub.dartlang.org" - source: hosted - version: "4.4.0" - platform: - dependency: transitive - description: - name: platform - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.2" - process: - dependency: transitive - description: - name: process - url: "https://pub.dartlang.org" - source: hosted - version: "4.2.4" - provider: - dependency: transitive - description: - name: provider - url: "https://pub.dartlang.org" - source: hosted - version: "6.0.2" - rxdart: - dependency: transitive - description: - name: rxdart - url: "https://pub.dartlang.org" - source: hosted - version: "0.27.3" - shared: - dependency: "direct main" - description: - path: "../shared" - relative: true - source: path - version: "1.0.0+1" - shared_preferences: - dependency: transitive - description: - name: shared_preferences - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.12" - shared_preferences_android: - dependency: transitive - description: - name: shared_preferences_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.10" - shared_preferences_ios: - dependency: transitive - description: - name: shared_preferences_ios - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.9" - shared_preferences_linux: - dependency: transitive - description: - name: shared_preferences_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.4" - shared_preferences_macos: - dependency: transitive - description: - name: shared_preferences_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.2" - shared_preferences_platform_interface: - dependency: transitive - description: - name: shared_preferences_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - shared_preferences_web: - dependency: transitive - description: - name: shared_preferences_web - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - shared_preferences_windows: - dependency: transitive - description: - name: shared_preferences_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.4" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_span: - dependency: transitive - description: - name: source_span - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.1" - sqflite: - dependency: transitive - description: - name: sqflite - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.2" - sqflite_common: - dependency: transitive - description: - name: sqflite_common - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.0" - stack_trace: - dependency: transitive - description: - name: stack_trace - url: "https://pub.dartlang.org" - source: hosted - version: "1.10.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - synchronized: - dependency: transitive - description: - name: synchronized - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - test_api: - dependency: transitive - description: - name: test_api - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.8" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - uuid: - dependency: transitive - description: - name: uuid - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.5" - vector_math: - dependency: transitive - description: - name: vector_math - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - win32: - dependency: transitive - description: - name: win32 - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.9" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - xml: - dependency: transitive - description: - name: xml - url: "https://pub.dartlang.org" - source: hosted - version: "5.3.1" -sdks: - dart: ">=2.15.0 <3.0.0" - flutter: ">=2.5.0" diff --git a/api_sdk/pubspec.yaml b/api_sdk/pubspec.yaml deleted file mode 100644 index 42cebf33..00000000 --- a/api_sdk/pubspec.yaml +++ /dev/null @@ -1,87 +0,0 @@ -name: api_sdk -description: A new Flutter project. - -# The following line prevents the package from being accidentally published to -# pub.dev using `pub publish`. This is preferred for private packages. -publish_to: "none" # Remove this line if you wish to publish to pub.dev - -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.0+1 - -environment: - sdk: ">=2.7.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.0 - http: - cloud_firestore: ^3.1.7 - firebase_core: ^1.12.0 - firebase_auth: - - graphql: ^5.0.0 - graphql_flutter: ^5.0.0 - gql: ^0.13.0 - freezed_annotation: ^1.1.0 - - equatable: ^2.0.3 - shared: - path: ../shared - -dev_dependencies: - flutter_test: - sdk: flutter - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter. -flutter: - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. - uses-material-design: true - - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware. - - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/assets-and-images/#from-packages - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/custom-fonts/#from-packages diff --git a/api_sdk/test/widget_test.dart b/api_sdk/test/widget_test.dart deleted file mode 100644 index 570e0e47..00000000 --- a/api_sdk/test/widget_test.dart +++ /dev/null @@ -1,8 +0,0 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility that Flutter provides. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - -void main() {} diff --git a/app/.gitignore b/app/.gitignore deleted file mode 100644 index 9d532b18..00000000 --- a/app/.gitignore +++ /dev/null @@ -1,41 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json diff --git a/app/.metadata b/app/.metadata deleted file mode 100644 index 107fcb7b..00000000 --- a/app/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 8874f21e79d7ec66d0457c7ab338348e31b17f1d - channel: stable - -project_type: app diff --git a/app/README.md b/app/README.md deleted file mode 100644 index e7694a28..00000000 --- a/app/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# app - -A new Flutter project. - -## Getting Started - -This project is a starting point for a Flutter application. - -A few resources to get you started if this is your first Flutter project: - -- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) - -For help getting started with Flutter, view our -[online documentation](https://flutter.dev/docs), which offers tutorials, -samples, guidance on mobile development, and a full API reference. diff --git a/app/android/.gitignore b/app/android/.gitignore deleted file mode 100644 index 0a741cb4..00000000 --- a/app/android/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java - -# Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app -key.properties diff --git a/app/android/app/build.gradle b/app/android/app/build.gradle deleted file mode 100644 index f357b14d..00000000 --- a/app/android/app/build.gradle +++ /dev/null @@ -1,65 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 29 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - lintOptions { - disable 'InvalidPackage' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.app" - minSdkVersion 19 - targetSdkVersion 29 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - multiDexEnabled true - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'com.android.support:multidex:1.0.3' -} diff --git a/app/android/app/src/main/AndroidManifest.xml b/app/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 4e419fb3..00000000 --- a/app/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/app/android/app/src/main/kotlin/com/example/app/MainActivity.kt b/app/android/app/src/main/kotlin/com/example/app/MainActivity.kt deleted file mode 100644 index fbb41ef4..00000000 --- a/app/android/app/src/main/kotlin/com/example/app/MainActivity.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.example.app - -import io.flutter.embedding.android.FlutterActivity - -import android.os.Build -import android.view.ViewTreeObserver -import android.view.WindowManager -class MainActivity: FlutterActivity() { -} \ No newline at end of file diff --git a/app/android/app/src/main/res/drawable-hdpi/splash.png b/app/android/app/src/main/res/drawable-hdpi/splash.png deleted file mode 100644 index bd5b2378..00000000 Binary files a/app/android/app/src/main/res/drawable-hdpi/splash.png and /dev/null differ diff --git a/app/android/app/src/main/res/drawable-mdpi/splash.png b/app/android/app/src/main/res/drawable-mdpi/splash.png deleted file mode 100644 index 9a2406d7..00000000 Binary files a/app/android/app/src/main/res/drawable-mdpi/splash.png and /dev/null differ diff --git a/app/android/app/src/main/res/drawable-xhdpi/splash.png b/app/android/app/src/main/res/drawable-xhdpi/splash.png deleted file mode 100644 index 988f04f5..00000000 Binary files a/app/android/app/src/main/res/drawable-xhdpi/splash.png and /dev/null differ diff --git a/app/android/app/src/main/res/drawable-xxhdpi/splash.png b/app/android/app/src/main/res/drawable-xxhdpi/splash.png deleted file mode 100644 index 4d95e8c8..00000000 Binary files a/app/android/app/src/main/res/drawable-xxhdpi/splash.png and /dev/null differ diff --git a/app/android/app/src/main/res/drawable-xxxhdpi/splash.png b/app/android/app/src/main/res/drawable-xxxhdpi/splash.png deleted file mode 100644 index e0028788..00000000 Binary files a/app/android/app/src/main/res/drawable-xxxhdpi/splash.png and /dev/null differ diff --git a/app/android/app/src/main/res/drawable/launch_background.xml b/app/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 8c09435e..00000000 --- a/app/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - diff --git a/app/android/app/src/main/res/values-night/styles.xml b/app/android/app/src/main/res/values-night/styles.xml deleted file mode 100644 index 3db14bb5..00000000 --- a/app/android/app/src/main/res/values-night/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/app/android/app/src/main/res/values/colors.xml b/app/android/app/src/main/res/values/colors.xml deleted file mode 100644 index 38a981b4..00000000 --- a/app/android/app/src/main/res/values/colors.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - #5E92F3 - \ No newline at end of file diff --git a/app/android/app/src/main/res/values/styles.xml b/app/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 1f83a33f..00000000 --- a/app/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/app/android/app/src/profile/AndroidManifest.xml b/app/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index 99f406bd..00000000 --- a/app/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/app/android/build.gradle b/app/android/build.gradle deleted file mode 100644 index 3100ad2d..00000000 --- a/app/android/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/app/android/gradle.properties b/app/android/gradle.properties deleted file mode 100644 index a6738207..00000000 --- a/app/android/gradle.properties +++ /dev/null @@ -1,4 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.useAndroidX=true -android.enableJetifier=true -android.enableR8=true diff --git a/app/android/gradle/wrapper/gradle-wrapper.properties b/app/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 296b146b..00000000 --- a/app/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip diff --git a/app/ios/.gitignore b/app/ios/.gitignore deleted file mode 100644 index e96ef602..00000000 --- a/app/ios/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -*.mode1v3 -*.mode2v3 -*.moved-aside -*.pbxuser -*.perspectivev3 -**/*sync/ -.sconsign.dblite -.tags* -**/.vagrant/ -**/DerivedData/ -Icon? -**/Pods/ -**/.symlinks/ -profile -xcuserdata -**/.generated/ -Flutter/App.framework -Flutter/Flutter.framework -Flutter/Flutter.podspec -Flutter/Generated.xcconfig -Flutter/app.flx -Flutter/app.zip -Flutter/flutter_assets/ -Flutter/flutter_export_environment.sh -ServiceDefinitions.json -Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!default.mode1v3 -!default.mode2v3 -!default.pbxuser -!default.perspectivev3 diff --git a/app/ios/Flutter/AppFrameworkInfo.plist b/app/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index f2872cf4..00000000 --- a/app/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 9.0 - - diff --git a/app/ios/Flutter/Debug.xcconfig b/app/ios/Flutter/Debug.xcconfig deleted file mode 100644 index e8efba11..00000000 --- a/app/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" -#include "Generated.xcconfig" diff --git a/app/ios/Flutter/Release.xcconfig b/app/ios/Flutter/Release.xcconfig deleted file mode 100644 index 399e9340..00000000 --- a/app/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" -#include "Generated.xcconfig" diff --git a/app/ios/Podfile.lock b/app/ios/Podfile.lock deleted file mode 100644 index d5a4c2b1..00000000 --- a/app/ios/Podfile.lock +++ /dev/null @@ -1,457 +0,0 @@ -PODS: - - abseil/algorithm (0.20200225.0): - - abseil/algorithm/algorithm (= 0.20200225.0) - - abseil/algorithm/container (= 0.20200225.0) - - abseil/algorithm/algorithm (0.20200225.0): - - abseil/base/config - - abseil/algorithm/container (0.20200225.0): - - abseil/algorithm/algorithm - - abseil/base/core_headers - - abseil/meta/type_traits - - abseil/base (0.20200225.0): - - abseil/base/atomic_hook (= 0.20200225.0) - - abseil/base/base (= 0.20200225.0) - - abseil/base/base_internal (= 0.20200225.0) - - abseil/base/bits (= 0.20200225.0) - - abseil/base/config (= 0.20200225.0) - - abseil/base/core_headers (= 0.20200225.0) - - abseil/base/dynamic_annotations (= 0.20200225.0) - - abseil/base/endian (= 0.20200225.0) - - abseil/base/errno_saver (= 0.20200225.0) - - abseil/base/exponential_biased (= 0.20200225.0) - - abseil/base/log_severity (= 0.20200225.0) - - abseil/base/malloc_internal (= 0.20200225.0) - - abseil/base/periodic_sampler (= 0.20200225.0) - - abseil/base/pretty_function (= 0.20200225.0) - - abseil/base/raw_logging_internal (= 0.20200225.0) - - abseil/base/spinlock_wait (= 0.20200225.0) - - abseil/base/throw_delegate (= 0.20200225.0) - - abseil/base/atomic_hook (0.20200225.0): - - abseil/base/config - - abseil/base/core_headers - - abseil/base/base (0.20200225.0): - - abseil/base/atomic_hook - - abseil/base/base_internal - - abseil/base/config - - abseil/base/core_headers - - abseil/base/dynamic_annotations - - abseil/base/log_severity - - abseil/base/raw_logging_internal - - abseil/base/spinlock_wait - - abseil/meta/type_traits - - abseil/base/base_internal (0.20200225.0): - - abseil/base/config - - abseil/meta/type_traits - - abseil/base/bits (0.20200225.0): - - abseil/base/config - - abseil/base/core_headers - - abseil/base/config (0.20200225.0) - - abseil/base/core_headers (0.20200225.0): - - abseil/base/config - - abseil/base/dynamic_annotations (0.20200225.0) - - abseil/base/endian (0.20200225.0): - - abseil/base/config - - abseil/base/core_headers - - abseil/base/errno_saver (0.20200225.0): - - abseil/base/config - - abseil/base/exponential_biased (0.20200225.0): - - abseil/base/config - - abseil/base/core_headers - - abseil/base/log_severity (0.20200225.0): - - abseil/base/config - - abseil/base/core_headers - - abseil/base/malloc_internal (0.20200225.0): - - abseil/base/base - - abseil/base/base_internal - - abseil/base/config - - abseil/base/core_headers - - abseil/base/dynamic_annotations - - abseil/base/raw_logging_internal - - abseil/base/periodic_sampler (0.20200225.0): - - abseil/base/core_headers - - abseil/base/exponential_biased - - abseil/base/pretty_function (0.20200225.0) - - abseil/base/raw_logging_internal (0.20200225.0): - - abseil/base/atomic_hook - - abseil/base/config - - abseil/base/core_headers - - abseil/base/log_severity - - abseil/base/spinlock_wait (0.20200225.0): - - abseil/base/base_internal - - abseil/base/core_headers - - abseil/base/errno_saver - - abseil/base/throw_delegate (0.20200225.0): - - abseil/base/config - - abseil/base/raw_logging_internal - - abseil/container/compressed_tuple (0.20200225.0): - - abseil/utility/utility - - abseil/container/inlined_vector (0.20200225.0): - - abseil/algorithm/algorithm - - abseil/base/core_headers - - abseil/base/throw_delegate - - abseil/container/inlined_vector_internal - - abseil/memory/memory - - abseil/container/inlined_vector_internal (0.20200225.0): - - abseil/base/core_headers - - abseil/container/compressed_tuple - - abseil/memory/memory - - abseil/meta/type_traits - - abseil/types/span - - abseil/memory (0.20200225.0): - - abseil/memory/memory (= 0.20200225.0) - - abseil/memory/memory (0.20200225.0): - - abseil/base/core_headers - - abseil/meta/type_traits - - abseil/meta (0.20200225.0): - - abseil/meta/type_traits (= 0.20200225.0) - - abseil/meta/type_traits (0.20200225.0): - - abseil/base/config - - abseil/numeric/int128 (0.20200225.0): - - abseil/base/config - - abseil/base/core_headers - - abseil/strings/internal (0.20200225.0): - - abseil/base/config - - abseil/base/core_headers - - abseil/base/endian - - abseil/base/raw_logging_internal - - abseil/meta/type_traits - - abseil/strings/str_format (0.20200225.0): - - abseil/strings/str_format_internal - - abseil/strings/str_format_internal (0.20200225.0): - - abseil/base/config - - abseil/base/core_headers - - abseil/meta/type_traits - - abseil/numeric/int128 - - abseil/strings/strings - - abseil/types/span - - abseil/strings/strings (0.20200225.0): - - abseil/base/base - - abseil/base/bits - - abseil/base/config - - abseil/base/core_headers - - abseil/base/endian - - abseil/base/raw_logging_internal - - abseil/base/throw_delegate - - abseil/memory/memory - - abseil/meta/type_traits - - abseil/numeric/int128 - - abseil/strings/internal - - abseil/time (0.20200225.0): - - abseil/time/internal (= 0.20200225.0) - - abseil/time/time (= 0.20200225.0) - - abseil/time/internal (0.20200225.0): - - abseil/time/internal/cctz (= 0.20200225.0) - - abseil/time/internal/cctz (0.20200225.0): - - abseil/time/internal/cctz/civil_time (= 0.20200225.0) - - abseil/time/internal/cctz/time_zone (= 0.20200225.0) - - abseil/time/internal/cctz/civil_time (0.20200225.0): - - abseil/base/config - - abseil/time/internal/cctz/time_zone (0.20200225.0): - - abseil/base/config - - abseil/time/internal/cctz/civil_time - - abseil/time/time (0.20200225.0): - - abseil/base/base - - abseil/base/core_headers - - abseil/base/raw_logging_internal - - abseil/numeric/int128 - - abseil/strings/strings - - abseil/time/internal/cctz/civil_time - - abseil/time/internal/cctz/time_zone - - abseil/types (0.20200225.0): - - abseil/types/any (= 0.20200225.0) - - abseil/types/bad_any_cast (= 0.20200225.0) - - abseil/types/bad_any_cast_impl (= 0.20200225.0) - - abseil/types/bad_optional_access (= 0.20200225.0) - - abseil/types/bad_variant_access (= 0.20200225.0) - - abseil/types/compare (= 0.20200225.0) - - abseil/types/optional (= 0.20200225.0) - - abseil/types/span (= 0.20200225.0) - - abseil/types/variant (= 0.20200225.0) - - abseil/types/any (0.20200225.0): - - abseil/base/config - - abseil/base/core_headers - - abseil/meta/type_traits - - abseil/types/bad_any_cast - - abseil/utility/utility - - abseil/types/bad_any_cast (0.20200225.0): - - abseil/base/config - - abseil/types/bad_any_cast_impl - - abseil/types/bad_any_cast_impl (0.20200225.0): - - abseil/base/config - - abseil/base/raw_logging_internal - - abseil/types/bad_optional_access (0.20200225.0): - - abseil/base/config - - abseil/base/raw_logging_internal - - abseil/types/bad_variant_access (0.20200225.0): - - abseil/base/config - - abseil/base/raw_logging_internal - - abseil/types/compare (0.20200225.0): - - abseil/base/core_headers - - abseil/meta/type_traits - - abseil/types/optional (0.20200225.0): - - abseil/base/base_internal - - abseil/base/config - - abseil/base/core_headers - - abseil/memory/memory - - abseil/meta/type_traits - - abseil/types/bad_optional_access - - abseil/utility/utility - - abseil/types/span (0.20200225.0): - - abseil/algorithm/algorithm - - abseil/base/core_headers - - abseil/base/throw_delegate - - abseil/meta/type_traits - - abseil/types/variant (0.20200225.0): - - abseil/base/base_internal - - abseil/base/config - - abseil/base/core_headers - - abseil/meta/type_traits - - abseil/types/bad_variant_access - - abseil/utility/utility - - abseil/utility/utility (0.20200225.0): - - abseil/base/base_internal - - abseil/base/config - - abseil/meta/type_traits - - BoringSSL-GRPC (0.0.7): - - BoringSSL-GRPC/Implementation (= 0.0.7) - - BoringSSL-GRPC/Interface (= 0.0.7) - - BoringSSL-GRPC/Implementation (0.0.7): - - BoringSSL-GRPC/Interface (= 0.0.7) - - BoringSSL-GRPC/Interface (0.0.7) - - cloud_firestore (0.0.1): - - Firebase/Core - - Firebase/Firestore (~> 6.0) - - Flutter - - connectivity (0.0.1): - - Flutter - - Reachability - - Firebase/Auth (6.34.0): - - Firebase/CoreOnly - - FirebaseAuth (~> 6.9.2) - - Firebase/Core (6.34.0): - - Firebase/CoreOnly - - FirebaseAnalytics (= 6.9.0) - - Firebase/CoreOnly (6.34.0): - - FirebaseCore (= 6.10.4) - - Firebase/Firestore (6.34.0): - - Firebase/CoreOnly - - FirebaseFirestore (~> 1.19.0) - - firebase_auth (0.0.1): - - Firebase/Auth (~> 6.3) - - Firebase/Core - - Flutter - - firebase_core (0.0.1): - - Firebase/Core - - Flutter - - FirebaseAnalytics (6.9.0): - - FirebaseCore (~> 6.10) - - FirebaseInstallations (~> 1.7) - - GoogleAppMeasurement (= 6.9.0) - - GoogleUtilities/AppDelegateSwizzler (~> 6.7) - - GoogleUtilities/MethodSwizzler (~> 6.7) - - GoogleUtilities/Network (~> 6.7) - - "GoogleUtilities/NSData+zlib (~> 6.7)" - - nanopb (~> 1.30906.0) - - FirebaseAuth (6.9.2): - - FirebaseCore (~> 6.10) - - GoogleUtilities/AppDelegateSwizzler (~> 6.7) - - GoogleUtilities/Environment (~> 6.7) - - GTMSessionFetcher/Core (~> 1.1) - - FirebaseCore (6.10.4): - - FirebaseCoreDiagnostics (~> 1.6) - - GoogleUtilities/Environment (~> 6.7) - - GoogleUtilities/Logger (~> 6.7) - - FirebaseCoreDiagnostics (1.7.0): - - GoogleDataTransport (~> 7.4) - - GoogleUtilities/Environment (~> 6.7) - - GoogleUtilities/Logger (~> 6.7) - - nanopb (~> 1.30906.0) - - FirebaseFirestore (1.19.0): - - abseil/algorithm (= 0.20200225.0) - - abseil/base (= 0.20200225.0) - - abseil/memory (= 0.20200225.0) - - abseil/meta (= 0.20200225.0) - - abseil/strings/strings (= 0.20200225.0) - - abseil/time (= 0.20200225.0) - - abseil/types (= 0.20200225.0) - - FirebaseCore (~> 6.10) - - "gRPC-C++ (~> 1.28.0)" - - leveldb-library (~> 1.22) - - nanopb (~> 1.30906.0) - - FirebaseInstallations (1.7.0): - - FirebaseCore (~> 6.10) - - GoogleUtilities/Environment (~> 6.7) - - GoogleUtilities/UserDefaults (~> 6.7) - - PromisesObjC (~> 1.2) - - Flutter (1.0.0) - - fluttertoast (0.0.2): - - Flutter - - Toast - - FMDB (2.7.5): - - FMDB/standard (= 2.7.5) - - FMDB/standard (2.7.5) - - GoogleAppMeasurement (6.9.0): - - GoogleUtilities/AppDelegateSwizzler (~> 6.7) - - GoogleUtilities/MethodSwizzler (~> 6.7) - - GoogleUtilities/Network (~> 6.7) - - "GoogleUtilities/NSData+zlib (~> 6.7)" - - nanopb (~> 1.30906.0) - - GoogleDataTransport (7.5.1): - - nanopb (~> 1.30906.0) - - GoogleUtilities/AppDelegateSwizzler (6.7.2): - - GoogleUtilities/Environment - - GoogleUtilities/Logger - - GoogleUtilities/Network - - GoogleUtilities/Environment (6.7.2): - - PromisesObjC (~> 1.2) - - GoogleUtilities/Logger (6.7.2): - - GoogleUtilities/Environment - - GoogleUtilities/MethodSwizzler (6.7.2): - - GoogleUtilities/Logger - - GoogleUtilities/Network (6.7.2): - - GoogleUtilities/Logger - - "GoogleUtilities/NSData+zlib" - - GoogleUtilities/Reachability - - "GoogleUtilities/NSData+zlib (6.7.2)" - - GoogleUtilities/Reachability (6.7.2): - - GoogleUtilities/Logger - - GoogleUtilities/UserDefaults (6.7.2): - - GoogleUtilities/Logger - - "gRPC-C++ (1.28.2)": - - "gRPC-C++/Implementation (= 1.28.2)" - - "gRPC-C++/Interface (= 1.28.2)" - - "gRPC-C++/Implementation (1.28.2)": - - abseil/container/inlined_vector (= 0.20200225.0) - - abseil/memory/memory (= 0.20200225.0) - - abseil/strings/str_format (= 0.20200225.0) - - abseil/strings/strings (= 0.20200225.0) - - abseil/types/optional (= 0.20200225.0) - - "gRPC-C++/Interface (= 1.28.2)" - - gRPC-Core (= 1.28.2) - - "gRPC-C++/Interface (1.28.2)" - - gRPC-Core (1.28.2): - - gRPC-Core/Implementation (= 1.28.2) - - gRPC-Core/Interface (= 1.28.2) - - gRPC-Core/Implementation (1.28.2): - - abseil/container/inlined_vector (= 0.20200225.0) - - abseil/memory/memory (= 0.20200225.0) - - abseil/strings/str_format (= 0.20200225.0) - - abseil/strings/strings (= 0.20200225.0) - - abseil/types/optional (= 0.20200225.0) - - BoringSSL-GRPC (= 0.0.7) - - gRPC-Core/Interface (= 1.28.2) - - gRPC-Core/Interface (1.28.2) - - GTMSessionFetcher/Core (1.5.0) - - leveldb-library (1.22.1) - - nanopb (1.30906.0): - - nanopb/decode (= 1.30906.0) - - nanopb/encode (= 1.30906.0) - - nanopb/decode (1.30906.0) - - nanopb/encode (1.30906.0) - - path_provider (0.0.1): - - Flutter - - PromisesObjC (1.2.12) - - Reachability (3.2) - - shared_preferences (0.0.1): - - Flutter - - sqflite (0.0.2): - - Flutter - - FMDB (>= 2.7.5) - - Toast (4.0.0) - - webview_flutter (0.0.1): - - Flutter - -DEPENDENCIES: - - cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) - - connectivity (from `.symlinks/plugins/connectivity/ios`) - - firebase_auth (from `.symlinks/plugins/firebase_auth/ios`) - - firebase_core (from `.symlinks/plugins/firebase_core/ios`) - - Flutter (from `Flutter`) - - fluttertoast (from `.symlinks/plugins/fluttertoast/ios`) - - path_provider (from `.symlinks/plugins/path_provider/ios`) - - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`) - - sqflite (from `.symlinks/plugins/sqflite/ios`) - - webview_flutter (from `.symlinks/plugins/webview_flutter/ios`) - -SPEC REPOS: - trunk: - - abseil - - BoringSSL-GRPC - - Firebase - - FirebaseAnalytics - - FirebaseAuth - - FirebaseCore - - FirebaseCoreDiagnostics - - FirebaseFirestore - - FirebaseInstallations - - FMDB - - GoogleAppMeasurement - - GoogleDataTransport - - GoogleUtilities - - "gRPC-C++" - - gRPC-Core - - GTMSessionFetcher - - leveldb-library - - nanopb - - PromisesObjC - - Reachability - - Toast - -EXTERNAL SOURCES: - cloud_firestore: - :path: ".symlinks/plugins/cloud_firestore/ios" - connectivity: - :path: ".symlinks/plugins/connectivity/ios" - firebase_auth: - :path: ".symlinks/plugins/firebase_auth/ios" - firebase_core: - :path: ".symlinks/plugins/firebase_core/ios" - Flutter: - :path: Flutter - fluttertoast: - :path: ".symlinks/plugins/fluttertoast/ios" - path_provider: - :path: ".symlinks/plugins/path_provider/ios" - shared_preferences: - :path: ".symlinks/plugins/shared_preferences/ios" - sqflite: - :path: ".symlinks/plugins/sqflite/ios" - webview_flutter: - :path: ".symlinks/plugins/webview_flutter/ios" - -SPEC CHECKSUMS: - abseil: 6c8eb7892aefa08d929b39f9bb108e5367e3228f - BoringSSL-GRPC: 8edf627ee524575e2f8d19d56f068b448eea3879 - cloud_firestore: 10fd4a09ebffc33efd64708106e2e7de701fe9ae - connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467 - Firebase: c23a36d9e4cdf7877dfcba8dd0c58add66358999 - firebase_auth: af8784c4d8d87c36f730a305f97bfbcb24db024b - firebase_core: 335c02abd48672b7c83c683df833d0488a72e73e - FirebaseAnalytics: 3bb096873ee0d7fa4b6c70f5e9166b6da413cc7f - FirebaseAuth: c92d49ada7948d1a23466e3db17bc4c2039dddc3 - FirebaseCore: d3a978a3cfa3240bf7e4ba7d137fdf5b22b628ec - FirebaseCoreDiagnostics: 770ac5958e1372ce67959ae4b4f31d8e127c3ac1 - FirebaseFirestore: 9b2f1b9b9a6f2f0b6fb7484b9e32ab7e39243554 - FirebaseInstallations: 466c7b4d1f58fe16707693091da253726a731ed2 - Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c - fluttertoast: 6122fa75143e992b1d3470f61000f591a798cc58 - FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a - GoogleAppMeasurement: a6a3a066369828db64eda428cb2856dc1cdc7c4e - GoogleDataTransport: f56af7caa4ed338dc8e138a5d7c5973e66440833 - GoogleUtilities: 7f2f5a07f888cdb145101d6042bc4422f57e70b3 - "gRPC-C++": 13d8ccef97d5c3c441b7e3c529ef28ebee86fad2 - gRPC-Core: 4afa11bfbedf7cdecd04de535a9e046893404ed5 - GTMSessionFetcher: b3503b20a988c4e20cc189aa798fd18220133f52 - leveldb-library: 50c7b45cbd7bf543c81a468fe557a16ae3db8729 - nanopb: 59317e09cf1f1a0af72f12af412d54edf52603fc - path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c - PromisesObjC: 3113f7f76903778cf4a0586bd1ab89329a0b7b97 - Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96 - shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d - sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904 - Toast: 91b396c56ee72a5790816f40d3a94dd357abc196 - webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96 - -PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c - -COCOAPODS: 1.10.1 diff --git a/app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index a28140cf..00000000 --- a/app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/ios/Runner/AppDelegate.swift b/app/ios/Runner/AppDelegate.swift deleted file mode 100644 index 94710963..00000000 --- a/app/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,16 +0,0 @@ -import UIKit -import Flutter - -@UIApplicationMain -@objc class AppDelegate: FlutterAppDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - var flutter_native_splash = 1 - UIApplication.shared.isStatusBarHidden = false - - GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } -} \ No newline at end of file diff --git a/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 80e6bf44..00000000 Binary files a/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9a2406d7..00000000 Binary files a/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index e0028788..00000000 Binary files a/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/app/ios/Runner/Base.lproj/LaunchScreen.storyboard b/app/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index 773caee3..00000000 --- a/app/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/ios/Runner/Info.plist b/app/ios/Runner/Info.plist deleted file mode 100644 index 0e1ed08b..00000000 --- a/app/ios/Runner/Info.plist +++ /dev/null @@ -1,48 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - app - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - UIStatusBarHidden - - - - \ No newline at end of file diff --git a/app/lib/main.dart b/app/lib/main.dart deleted file mode 100644 index e5859d7c..00000000 --- a/app/lib/main.dart +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:app/src/app.dart'; -import 'package:app/src/utils/app_state_notifier.dart'; -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -void main() { - runApp( - ChangeNotifierProvider( - create: (_) => AppStateNotifier(), - child: App(), - ), - ); -} diff --git a/app/lib/src/app.dart b/app/lib/src/app.dart deleted file mode 100644 index 44213c7c..00000000 --- a/app/lib/src/app.dart +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:app/src/config/theme_data.dart'; -import 'package:app/src/routes/index.dart'; -import 'package:app/src/utils/app_state_notifier.dart'; -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -class App extends StatelessWidget { - Widget build(BuildContext context) { - return Consumer(builder: (context, appState, child) { - return MaterialApp( - title: 'News!', - theme: ThemeConfig.lightTheme, - darkTheme: ThemeConfig.darkTheme, - themeMode: appState.isDarkMode ? ThemeMode.dark : ThemeMode.light, - onGenerateRoute: routes, - ); - }); - } -} diff --git a/app/lib/src/config/color_constants.dart b/app/lib/src/config/color_constants.dart deleted file mode 100644 index 77c1f519..00000000 --- a/app/lib/src/config/color_constants.dart +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:flutter/material.dart'; - -Color hexToColor(String hex) { - assert(RegExp(r'^#([0-9a-fA-F]{6})|([0-9a-fA-F]{8})$').hasMatch(hex), - 'hex color must be #rrggbb or #rrggbbaa'); - - return Color( - int.parse(hex.substring(1), radix: 16) + - (hex.length == 7 ? 0xff000000 : 0x00000000), - ); -} - -class ColorConstants { - static Color lightScaffoldBackgroundColor = hexToColor('#F9F9F9'); - static Color darkScaffoldBackgroundColor = hexToColor('#2F2E2E'); - static Color secondaryAppColor = hexToColor('#5E92F3'); - static Color secondaryDarkAppColor = Colors.white; -} diff --git a/app/lib/src/config/string_constants.dart b/app/lib/src/config/string_constants.dart deleted file mode 100644 index d5c4708e..00000000 --- a/app/lib/src/config/string_constants.dart +++ /dev/null @@ -1,16 +0,0 @@ -library constants; - -// Onboarding Screens -const String app_name = "APP NAME"; - -// tabs -const String tab0 = "Tab 0"; -const String tab1 = "Tab 1"; -const String tab2 = "Tab 2"; -const String tab3 = "Tab 3"; - -//Screen 1 -const String screen_util = "Screen"; - -//home -const String app_bar_title = 'Flutter Starter'; diff --git a/app/lib/src/config/theme_data.dart b/app/lib/src/config/theme_data.dart deleted file mode 100644 index 07425035..00000000 --- a/app/lib/src/config/theme_data.dart +++ /dev/null @@ -1,217 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; - -import 'color_constants.dart'; - -class ThemeConfig { - static ThemeData get darkTheme => createTheme( - brightness: Brightness.dark, - background: ColorConstants.darkScaffoldBackgroundColor, - cardBackground: ColorConstants.secondaryDarkAppColor, - primaryText: Colors.white, - secondaryText: Colors.black, - accentColor: ColorConstants.secondaryDarkAppColor, - divider: Colors.black45, - buttonBackground: Colors.white, - buttonText: ColorConstants.secondaryDarkAppColor, - disabled: ColorConstants.secondaryDarkAppColor, - error: Colors.red, - ); - - static ThemeData get lightTheme => createTheme( - brightness: Brightness.light, - background: ColorConstants.lightScaffoldBackgroundColor, - cardBackground: ColorConstants.secondaryAppColor, - primaryText: Colors.black, - secondaryText: Colors.white, - accentColor: ColorConstants.secondaryAppColor, - divider: ColorConstants.secondaryAppColor, - buttonBackground: Colors.black38, - buttonText: ColorConstants.secondaryAppColor, - disabled: ColorConstants.secondaryAppColor, - error: Colors.red, - ); - - static ThemeData createTheme({ - Brightness brightness, - Color background, - Color primaryText, - Color secondaryText, - Color accentColor, - Color divider, - Color buttonBackground, - Color buttonText, - Color cardBackground, - Color disabled, - Color error, - }) { - final baseTextTheme = brightness == Brightness.dark - ? Typography.blackMountainView - : Typography.whiteMountainView; - - return ThemeData( - brightness: brightness, - canvasColor: background, - cardColor: background, - dividerColor: divider, - dividerTheme: DividerThemeData( - color: divider, - space: 1, - thickness: 1, - ), - cardTheme: CardTheme( - color: cardBackground, - margin: EdgeInsets.zero, - clipBehavior: Clip.antiAliasWithSaveLayer, - ), - elevatedButtonTheme: ElevatedButtonThemeData( - style: ButtonStyle( - shape: MaterialStateProperty.all( - RoundedRectangleBorder( - borderRadius: BorderRadius.circular(18.0), - side: BorderSide(color: Colors.red))), - padding: MaterialStateProperty.all( - const EdgeInsets.all(16)))), - backgroundColor: background, - primaryColor: accentColor, - toggleableActiveColor: accentColor, - appBarTheme: AppBarTheme( - systemOverlayStyle: - SystemUiOverlayStyle(statusBarBrightness: brightness), - color: cardBackground, - iconTheme: IconThemeData( - color: secondaryText, - ), - toolbarTextStyle: TextTheme( - bodyText1: baseTextTheme.bodyText1.copyWith( - color: secondaryText, - fontSize: 18, - ), - ).bodyText2, - titleTextStyle: TextTheme( - bodyText1: baseTextTheme.bodyText1.copyWith( - color: secondaryText, - fontSize: 18, - ), - ).headline6, - ), - iconTheme: IconThemeData( - color: secondaryText, - size: 16.0, - ), - errorColor: error, - buttonTheme: ButtonThemeData( - textTheme: ButtonTextTheme.primary, - colorScheme: ColorScheme( - brightness: brightness, - primary: accentColor, - primaryVariant: accentColor, - secondary: accentColor, - secondaryVariant: accentColor, - surface: background, - background: background, - error: error, - onPrimary: buttonText, - onSecondary: buttonText, - onSurface: buttonText, - onBackground: buttonText, - onError: buttonText, - ), - padding: const EdgeInsets.all(16.0), - ), - cupertinoOverrideTheme: CupertinoThemeData( - brightness: brightness, - primaryColor: accentColor, - ), - inputDecorationTheme: InputDecorationTheme( - errorStyle: TextStyle(color: error), - labelStyle: TextStyle( - fontFamily: '', - fontWeight: FontWeight.w600, - fontSize: 16.0, - color: primaryText.withOpacity(0.5), - ), - hintStyle: TextStyle( - color: secondaryText, - fontSize: 13.0, - fontWeight: FontWeight.w300, - ), - ), - fontFamily: '', - textTheme: TextTheme( - headline1: baseTextTheme.headline1.copyWith( - color: primaryText, - fontSize: 34.0, - fontWeight: FontWeight.bold, - ), - headline2: baseTextTheme.headline2.copyWith( - color: primaryText, - fontSize: 22, - fontWeight: FontWeight.bold, - ), - headline3: baseTextTheme.headline3.copyWith( - color: secondaryText, - fontSize: 20, - fontWeight: FontWeight.w600, - ), - headline4: baseTextTheme.headline4.copyWith( - color: primaryText, - fontSize: 18, - fontWeight: FontWeight.w600, - ), - headline5: baseTextTheme.headline5.copyWith( - color: primaryText, - fontSize: 16, - fontWeight: FontWeight.w700, - ), - headline6: baseTextTheme.headline6.copyWith( - color: primaryText, - fontSize: 14, - fontWeight: FontWeight.w700, - ), - bodyText1: baseTextTheme.bodyText1.copyWith( - color: secondaryText, - fontSize: 15, - ), - bodyText2: baseTextTheme.bodyText2.copyWith( - color: primaryText, - fontSize: 12, - fontWeight: FontWeight.w400, - ), - button: baseTextTheme.button.copyWith( - color: primaryText, - fontSize: 12.0, - fontWeight: FontWeight.w700, - ), - caption: baseTextTheme.caption.copyWith( - color: primaryText, - fontSize: 11.0, - fontWeight: FontWeight.w300, - ), - overline: baseTextTheme.overline.copyWith( - color: secondaryText, - fontSize: 11.0, - fontWeight: FontWeight.w500, - ), - subtitle1: baseTextTheme.subtitle1.copyWith( - color: primaryText, - fontSize: 16.0, - fontWeight: FontWeight.w700, - ), - subtitle2: baseTextTheme.subtitle2.copyWith( - color: secondaryText, - fontSize: 11.0, - fontWeight: FontWeight.w500, - ), - ), - colorScheme: ColorScheme.fromSwatch() - .copyWith(secondary: accentColor, brightness: brightness), - textSelectionTheme: TextSelectionThemeData( - cursorColor: accentColor, - selectionColor: accentColor, - selectionHandleColor: accentColor, - ), - ); - } -} diff --git a/app/lib/src/routes/index.dart b/app/lib/src/routes/index.dart deleted file mode 100644 index 5b2647bc..00000000 --- a/app/lib/src/routes/index.dart +++ /dev/null @@ -1,18 +0,0 @@ -// routes for the app -import 'package:app/src/screens/home/index.dart'; -import 'package:app/src/screens/onboarding/authentication_screen.dart'; -import 'package:app/src/splash_screen.dart'; -import 'package:flutter/material.dart'; - -Route routes(RouteSettings settings) { - switch (settings.name) { - case '/': - return MaterialPageRoute(builder: (_) => SplashScreen()); - case '/home': - return MaterialPageRoute(builder: (_) => HomeScreen()); - case '/auth': - return MaterialPageRoute(builder: (_) => AuthenticationScreen()); - default: - return MaterialPageRoute(builder: (_) => SplashScreen()); - } -} diff --git a/app/lib/src/screens/home/index.dart b/app/lib/src/screens/home/index.dart deleted file mode 100644 index 611fc351..00000000 --- a/app/lib/src/screens/home/index.dart +++ /dev/null @@ -1,115 +0,0 @@ -// home screen contents -import 'package:app/src/config/image_constants.dart'; -import 'package:app/src/config/string_constants.dart' as string_constants; -import 'package:app/src/utils/app_state_notifier.dart'; -import 'package:app/src/widgets/cache_image_widget.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:provider/provider.dart'; -import 'package:shared/main.dart'; - -class HomeScreen extends StatelessWidget { - // ignore: close_sinks - final AuthenticationBloc authenticationBloc = - AuthenticationBlocController().authenticationBloc; - - @override - Widget build(BuildContext context) { - authenticationBloc.add(GetUserData()); - return WillPopScope( - onWillPop: () async => false, - child: BlocBuilder( - bloc: authenticationBloc, - builder: (BuildContext context, AuthenticationState state) { - if (state is SetUserData) { - return Scaffold( - appBar: AppBar( - centerTitle: true, - title: Text( - string_constants.app_bar_title, - style: Theme.of(context).textTheme.bodyText1, - ), - actions: [ - IconButton( - icon: Icon(Icons.logout), - onPressed: () { - authenticationBloc.add(UserLogOut()); - }), - ], - ), - body: Center( - child: Text('/home'), - ), - drawer: Drawer( - child: ListView( - padding: EdgeInsets.zero, - children: [ - DrawerHeader( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(50), - color: Colors.white), - child: CachedImage( - imageUrl: - state.currentUserData.data.avatar, - fit: BoxFit.fitWidth, - errorWidget: Image.network( - AllImages().kDefaultImage, - ), - width: 80, - height: 80, - placeholder: CircularProgressIndicator(), - ), - ), - Switch( - value: - Provider.of(context) - .isDarkMode, - onChanged: (value) { - Provider.of(context, - listen: false) - .updateTheme(value); - }, - ), - ], - ) - ], - ), - decoration: BoxDecoration( - color: Theme.of(context).dividerColor, - ), - ), - ListTile( - title: Text( - '${state.currentUserData.data.firstName} ${state.currentUserData.data.lastName}', - style: Theme.of(context).textTheme.bodyText2), - ), - ListTile( - title: Text(state.currentUserData.data.email, - style: Theme.of(context).textTheme.bodyText2), - ), - ListTile( - title: Text(state.currentUserData.ad.company, - style: Theme.of(context).textTheme.bodyText2), - ), - ], - ), - ), - ); - } - return Scaffold( - body: Center( - child: CircularProgressIndicator(), - ), - ); - })); - } -} diff --git a/app/lib/src/screens/onboarding/authentication_screen.dart b/app/lib/src/screens/onboarding/authentication_screen.dart deleted file mode 100644 index 77326694..00000000 --- a/app/lib/src/screens/onboarding/authentication_screen.dart +++ /dev/null @@ -1,129 +0,0 @@ -import 'package:app/src/screens/onboarding/login_screen.dart'; -import 'package:app/src/screens/onboarding/signup_screen.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:shared/main.dart'; - -class AuthenticationScreen extends StatefulWidget { - @override - _AuthenticationScreenState createState() => _AuthenticationScreenState(); -} - -class _AuthenticationScreenState extends State { - bool showLoginForm = false; - // ignore: close_sinks - AuthenticationBloc authenticationBloc; - @override - Widget build(BuildContext context) { - void _showError(String error) async { - await Fluttertoast.showToast( - msg: error, - toastLength: Toast.LENGTH_SHORT, - gravity: ToastGravity.BOTTOM, - timeInSecForIosWeb: 3, - backgroundColor: Colors.red, - textColor: Colors.white, - fontSize: 16.0); - } - - return Scaffold( - body: WillPopScope( - onWillPop: () async => false, - child: BlocListener( - bloc: authenticationBloc, - listener: (context, state) { - if (state is AuthenticationFailure) { - _showError(state.message); - } - }, - child: BlocBuilder( - bloc: authenticationBloc, - builder: (BuildContext context, AuthenticationState state) { - return SafeArea( - child: Stack( - children: [ - Center( - child: ListView( - shrinkWrap: true, - children: [ - Center( - child: Text( - showLoginForm ? 'LOGIN' : 'SIGN UP', - style: Theme.of(context).textTheme.headline2, - )), - Padding( - padding: const EdgeInsets.all(32.0), - child: showLoginForm - ? LoginForm( - authenticationBloc: authenticationBloc, - state: state, - ) - : SignUpForm( - authenticationBloc: authenticationBloc, - state: state, - ), - ), - showLoginForm - ? SizedBox() - : Padding( - padding: const EdgeInsets.all(32.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - SizedBox( - height: 38, - ), - Text('Already have an account?'), - SizedBox( - height: 8, - ), - ElevatedButton( - child: Text( - 'Login', - style: Theme.of(context) - .textTheme - .bodyText1, - ), - onPressed: () { - setState(() { - showLoginForm = true; - }); - }) - ], - ), - ) - ], - ), - ), - !showLoginForm - ? SizedBox() - : Positioned( - left: 6, - child: IconButton( - icon: Icon( - Icons.arrow_back_ios, - size: 32, - color: Theme.of(context).primaryColor, - ), - onPressed: () { - setState(() { - showLoginForm = false; - }); - }, - ), - ) - ], - ), - ); - }), - ), - )); - } - - @override - void initState() { - authenticationBloc = AuthenticationBlocController().authenticationBloc; - super.initState(); - } -} diff --git a/app/lib/src/screens/onboarding/login_screen.dart b/app/lib/src/screens/onboarding/login_screen.dart deleted file mode 100644 index d7a8d57b..00000000 --- a/app/lib/src/screens/onboarding/login_screen.dart +++ /dev/null @@ -1,79 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:shared/main.dart'; - -class LoginForm extends StatefulWidget { - final AuthenticationBloc authenticationBloc; - final AuthenticationState state; - LoginForm({this.authenticationBloc, this.state}); - @override - _LoginFormState createState() => _LoginFormState(); -} - -class _LoginFormState extends State { - final GlobalKey _key = GlobalKey(); - final _passwordController = TextEditingController(); - final _emailController = TextEditingController(); - - @override - Widget build(BuildContext context) { - return Form( - key: _key, - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - TextFormField( - decoration: InputDecoration( - labelText: 'Email address', - filled: true, - isDense: true, - ), - controller: _emailController, - keyboardType: TextInputType.emailAddress, - autocorrect: false, - validator: (value) { - if (value.isEmpty) { - return 'Email is required.'; - } - return null; - }, - ), - SizedBox( - height: 12, - ), - TextFormField( - decoration: InputDecoration( - labelText: 'Password', - filled: true, - isDense: true, - ), - obscureText: true, - controller: _passwordController, - validator: (value) { - if (value.isEmpty) { - return 'Password is required.'; - } - return null; - }, - ), - const SizedBox( - height: 16, - ), - ElevatedButton( - child: widget.state is AuthenticationLoading - ? CircularProgressIndicator( - backgroundColor: - Theme.of(context).textTheme.bodyText1.color, - ) - : Text('Login', style: Theme.of(context).textTheme.bodyText1), - onPressed: () { - if (_key.currentState.validate()) { - widget.authenticationBloc.add(UserLogin( - email: _emailController.text, - password: _passwordController.text)); - } else {} - }) - ], - ), - ); - } -} diff --git a/app/lib/src/screens/onboarding/signup_screen.dart b/app/lib/src/screens/onboarding/signup_screen.dart deleted file mode 100644 index 03eaad47..00000000 --- a/app/lib/src/screens/onboarding/signup_screen.dart +++ /dev/null @@ -1,84 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:shared/main.dart'; - -class SignUpForm extends StatefulWidget { - final AuthenticationBloc authenticationBloc; - final AuthenticationState state; - SignUpForm({this.authenticationBloc, this.state}); - @override - _SignUpFormState createState() => _SignUpFormState(); -} - -class _SignUpFormState extends State { - final GlobalKey _key = GlobalKey(); - final _passwordController = TextEditingController(); - final _emailController = TextEditingController(); - - @override - Widget build(BuildContext context) { - return Form( - key: _key, - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - TextFormField( - decoration: InputDecoration( - labelText: 'Email address', - filled: true, - isDense: true, - ), - controller: _emailController, - keyboardType: TextInputType.emailAddress, - autocorrect: false, - validator: (value) { - if (value.isEmpty) { - return 'Email is required.'; - } - return null; - }, - ), - SizedBox( - height: 12, - ), - TextFormField( - decoration: InputDecoration( - labelText: 'Password', - filled: true, - isDense: true, - ), - obscureText: true, - controller: _passwordController, - validator: (value) { - if (value.isEmpty) { - return 'Password is required.'; - } - return null; - }, - ), - const SizedBox( - height: 16, - ), - ElevatedButton( - child: widget.state is AuthenticationLoading - ? CircularProgressIndicator( - backgroundColor: - Theme.of(context).textTheme.bodyText1.color, - ) - : Text( - 'Sign Up', - style: Theme.of(context).textTheme.bodyText1, - ), - onPressed: () { - if (_key.currentState.validate()) { - widget.authenticationBloc.add(UserSignUp( - email: _emailController.text, - password: _passwordController.text)); - } else { - print('Form not validated'); - } - }) - ], - ), - ); - } -} diff --git a/app/lib/src/splash_screen.dart b/app/lib/src/splash_screen.dart deleted file mode 100644 index 83deeca2..00000000 --- a/app/lib/src/splash_screen.dart +++ /dev/null @@ -1,45 +0,0 @@ -import 'package:app/src/config/color_constants.dart'; -import 'package:app/src/config/image_constants.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:shared/main.dart'; - -class SplashScreen extends StatefulWidget { - @override - _SplashScreenState createState() => _SplashScreenState(); -} - -class _SplashScreenState extends State { - AuthenticationBloc authenticationBloc; - @override - Widget build(BuildContext context) { - return Scaffold( - backgroundColor: ColorConstants.secondaryAppColor, - body: BlocListener( - bloc: authenticationBloc, - listener: (BuildContext context, AuthenticationState state) { - if (state is AppAutheticated) { - Navigator.pushNamed(context, '/home'); - } - if (state is AuthenticationStart) { - Navigator.pushNamed(context, '/auth'); - } - if (state is UserLogoutState) { - Navigator.pushNamed(context, '/auth'); - } - }, - child: BlocBuilder( - bloc: authenticationBloc, - builder: (BuildContext context, AuthenticationState state) { - return Center(child: Image.asset(AllImages().logo)); - }), - )); - } - - @override - void initState() { - authenticationBloc = AuthenticationBlocController().authenticationBloc; - authenticationBloc.add(AppLoadedup()); - super.initState(); - } -} diff --git a/app/lib/src/utils/app_state_notifier.dart b/app/lib/src/utils/app_state_notifier.dart deleted file mode 100644 index 1ddc68ec..00000000 --- a/app/lib/src/utils/app_state_notifier.dart +++ /dev/null @@ -1,10 +0,0 @@ -import 'package:flutter/material.dart'; - -class AppStateNotifier extends ChangeNotifier { - bool isDarkMode = false; - - void updateTheme(bool isDarkMode) { - this.isDarkMode = isDarkMode; - notifyListeners(); - } -} diff --git a/app/lib/src/utils/size_utils.dart b/app/lib/src/utils/size_utils.dart deleted file mode 100644 index b46a5fc1..00000000 --- a/app/lib/src/utils/size_utils.dart +++ /dev/null @@ -1,81 +0,0 @@ -import 'package:flutter/material.dart'; - -class SizeConfig { - SizeConfig._(); - static SizeConfig _instance = SizeConfig._(); - factory SizeConfig() => _instance; - - MediaQueryData _mediaQueryData; - double screenWidth; - double screenHeight; - double blockSizeHorizontal; - double blockSizeVertical; - double _safeAreaHorizontal; - double _safeAreaVertical; - double safeBlockHorizontal; - double safeBlockVertical; - double profileDrawerWidth; - double refHeight; - double refWidth; - - void init(BuildContext context) { - _mediaQueryData = MediaQuery.of(context); - screenWidth = _mediaQueryData.size.width; - screenHeight = _mediaQueryData.size.height; - refHeight = 1450; - refWidth = 670; - - if (screenHeight < 1200) { - blockSizeHorizontal = screenWidth / 100; - blockSizeVertical = screenHeight / 100; - - _safeAreaHorizontal = - _mediaQueryData.padding.left + _mediaQueryData.padding.right; - _safeAreaVertical = - _mediaQueryData.padding.top + _mediaQueryData.padding.bottom; - safeBlockHorizontal = (screenWidth - _safeAreaHorizontal) / 100; - safeBlockVertical = (screenHeight - _safeAreaVertical) / 100; - } else { - blockSizeHorizontal = screenWidth / 120; - blockSizeVertical = screenHeight / 120; - - _safeAreaHorizontal = - _mediaQueryData.padding.left + _mediaQueryData.padding.right; - _safeAreaVertical = - _mediaQueryData.padding.top + _mediaQueryData.padding.bottom; - safeBlockHorizontal = (screenWidth - _safeAreaHorizontal) / 120; - safeBlockVertical = (screenHeight - _safeAreaVertical) / 120; - } - } - - double getWidthRatio(double val) { - double res = (val / refWidth) * 100; - double temp = res * blockSizeHorizontal; - - return temp; - } - - double getHeightRatio(double val) { - double res = (val / refHeight) * 100; - double temp = res * blockSizeVertical; - return temp; - } - - double getFontRatio(double val) { - double res = (val / refWidth) * 100; - double temp = 0.0; - if (screenWidth < screenHeight) { - temp = res * safeBlockHorizontal; - } else { - temp = res * safeBlockVertical; - } - - return temp; - } -} - -extension SizeUtils on num { - double get toWidth => SizeConfig().getWidthRatio(this.toDouble()); - double get toHeight => SizeConfig().getHeightRatio(this.toDouble()); - double get toFont => SizeConfig().getFontRatio(this.toDouble()); -} diff --git a/app/lib/src/widgets/cache_image_widget.dart b/app/lib/src/widgets/cache_image_widget.dart deleted file mode 100644 index 022f17d1..00000000 --- a/app/lib/src/widgets/cache_image_widget.dart +++ /dev/null @@ -1,35 +0,0 @@ -import 'package:cached_network_image/cached_network_image.dart'; -import 'package:flutter/material.dart'; - -class CachedImage extends StatelessWidget { - CachedImage({ - Key key, - @required this.imageUrl, - this.fit = BoxFit.cover, - this.height, - this.width, - this.placeholder, - this.errorWidget, - }) : assert(imageUrl != null), - super(key: key); - - final String imageUrl; - final BoxFit fit; - final double height; - final double width; - final Widget placeholder; - final Widget errorWidget; - - @override - Widget build(BuildContext context) { - return CachedNetworkImage( - imageUrl: imageUrl, - fit: fit, - height: height, - width: width, - placeholder: (context, url) => placeholder ?? CircularProgressIndicator(), - errorWidget: (context, url, err) => - errorWidget ?? Icon(Icons.error_outline), - ); - } -} diff --git a/app/pubspec.yaml b/app/pubspec.yaml deleted file mode 100644 index 3135912a..00000000 --- a/app/pubspec.yaml +++ /dev/null @@ -1,92 +0,0 @@ -name: app -description: A new Flutter project. - -# The following line prevents the package from being accidentally published to -# pub.dev using `pub publish`. This is preferred for private packages. -publish_to: "none" # Remove this line if you wish to publish to pub.dev - -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.0+1 - -environment: - sdk: ">=2.7.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.0 - provider: - webview_flutter: ^3.0.0 - cloud_firestore: ^3.1.7 - firebase_core: ^1.12.0 - flutter_bloc: ^8.0.1 - meta: ^1.1.6 - bloc: ^8.0.2 - equatable: ^2.0.3 - fluttertoast: ^7.1.1 - cached_network_image: ^3.2.0 - shared: - path: ../shared -dev_dependencies: - flutter_test: - sdk: flutter - flutter_native_splash: ^2.0.2 - -flutter_native_splash: - image: assets/images/logo.png - color: "5E92F3" - android_disable_fullscreen: true -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter. -flutter: - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. - uses-material-design: true - - # To add assets to your application, add an assets section, like this: - assets: - - assets/images/logo.png - - assets/images/2.0x/logo.png - - assets/images/3.0x/logo.png - # - images/a_dot_ham.jpeg - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware. - - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/assets-and-images/#from-packages - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/custom-fonts/#from-packages diff --git a/app/test/widget_test.dart b/app/test/widget_test.dart deleted file mode 100644 index 570e0e47..00000000 --- a/app/test/widget_test.dart +++ /dev/null @@ -1,8 +0,0 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility that Flutter provides. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - -void main() {} diff --git a/app/web/index.html b/app/web/index.html deleted file mode 100644 index 9a16f36c..00000000 --- a/app/web/index.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - app - - - - - - - diff --git a/app/web/manifest.json b/app/web/manifest.json deleted file mode 100644 index 5620a335..00000000 --- a/app/web/manifest.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "app", - "short_name": "app", - "start_url": ".", - "display": "standalone", - "background_color": "#0175C2", - "theme_color": "#0175C2", - "description": "A new Flutter project.", - "orientation": "portrait-primary", - "prefer_related_applications": false, - "icons": [ - { - "src": "icons/Icon-192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "icons/Icon-512.png", - "sizes": "512x512", - "type": "image/png" - }, - { - "src": "icons/Icon-maskable-192.png", - "sizes": "192x192", - "type": "image/png", - "purpose": "maskable" - }, - { - "src": "icons/Icon-maskable-512.png", - "sizes": "512x512", - "type": "image/png", - "purpose": "maskable" - } - ] -} diff --git a/app/assets/images/2.0x/logo.png b/assets/images/2.0x/logo.png similarity index 100% rename from app/assets/images/2.0x/logo.png rename to assets/images/2.0x/logo.png diff --git a/app/assets/images/3.0x/logo.png b/assets/images/3.0x/logo.png similarity index 100% rename from app/assets/images/3.0x/logo.png rename to assets/images/3.0x/logo.png diff --git a/assets/images/login.png b/assets/images/login.png new file mode 100644 index 00000000..efefed09 Binary files /dev/null and b/assets/images/login.png differ diff --git a/app/assets/images/logo.png b/assets/images/logo.png similarity index 100% rename from app/assets/images/logo.png rename to assets/images/logo.png diff --git a/assets/images/signup.png b/assets/images/signup.png new file mode 100644 index 00000000..1d6850d6 Binary files /dev/null and b/assets/images/signup.png differ diff --git a/clean_project.sh b/clean_project.sh deleted file mode 100644 index d900326a..00000000 --- a/clean_project.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -cd api_sdk -echo "+++++API SDK pub clean+++++" -flutter clean -echo "+++++API SDK done+++++" - - -cd ../shared -echo "+++++Shared pub clean+++++" -flutter clean -echo "+++++Shared done+++++" - -cd ../app -echo "+++++Main app pub clean+++++" -flutter clean -echo "+++++Cleaning done+++++" \ No newline at end of file diff --git a/examples/book-store-firebase/.gitignore b/examples/book-store-firebase/.gitignore deleted file mode 100644 index 9d532b18..00000000 --- a/examples/book-store-firebase/.gitignore +++ /dev/null @@ -1,41 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json diff --git a/examples/book-store-firebase/README.md b/examples/book-store-firebase/README.md deleted file mode 100644 index 2f669083..00000000 --- a/examples/book-store-firebase/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Flutter starter - - -To start with this app you need to set up few things. - -Please refer to the [documentation](https://flutter-starter.github.io/docs/bookstore-firebase-app-example) for the steps. - -The demo for the app look like this: - - diff --git a/examples/book-store-firebase/api_sdk/.gitignore b/examples/book-store-firebase/api_sdk/.gitignore deleted file mode 100644 index 9d532b18..00000000 --- a/examples/book-store-firebase/api_sdk/.gitignore +++ /dev/null @@ -1,41 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json diff --git a/examples/book-store-firebase/api_sdk/.metadata b/examples/book-store-firebase/api_sdk/.metadata deleted file mode 100644 index 107fcb7b..00000000 --- a/examples/book-store-firebase/api_sdk/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 8874f21e79d7ec66d0457c7ab338348e31b17f1d - channel: stable - -project_type: app diff --git a/examples/book-store-firebase/api_sdk/README.md b/examples/book-store-firebase/api_sdk/README.md deleted file mode 100644 index 39e5a3fa..00000000 --- a/examples/book-store-firebase/api_sdk/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# api_sdk - -A new Flutter project. - -## Getting Started - -This project is a starting point for a Flutter application. - -A few resources to get you started if this is your first Flutter project: - -- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) - -For help getting started with Flutter, view our -[online documentation](https://flutter.dev/docs), which offers tutorials, -samples, guidance on mobile development, and a full API reference. diff --git a/examples/book-store-firebase/api_sdk/lib/api_constants.dart b/examples/book-store-firebase/api_sdk/lib/api_constants.dart deleted file mode 100644 index 7e43e9de..00000000 --- a/examples/book-store-firebase/api_sdk/lib/api_constants.dart +++ /dev/null @@ -1 +0,0 @@ -Map apiConstants = {"auth": "https://reqres.in/api"}; diff --git a/examples/book-store-firebase/api_sdk/lib/firebase_method/api_handles/firebase_api.dart b/examples/book-store-firebase/api_sdk/lib/firebase_method/api_handles/firebase_api.dart deleted file mode 100644 index 5d5f3345..00000000 --- a/examples/book-store-firebase/api_sdk/lib/firebase_method/api_handles/firebase_api.dart +++ /dev/null @@ -1,35 +0,0 @@ -import 'package:cloud_firestore/cloud_firestore.dart'; - -class FirebaseApi { - final FirebaseFirestore _db = FirebaseFirestore.instance; - final String path; - CollectionReference ref; - - FirebaseApi(this.path) { - ref = _db.collection(path); - } - - Future addDocument(Map data) { - return ref.add(data); - } - - Future getDataCollection() { - return ref.get(); - } - - Future getDocumentById(String id) { - return ref.doc(id).get(); - } - - Future removeDocument(String id) { - return ref.doc(id).delete(); - } - - Stream streamDataCollection() { - return ref.snapshots(); - } - - Future updateDocument(Map data, String id) { - return ref.doc(id).update(data); - } -} diff --git a/examples/book-store-firebase/api_sdk/lib/firebase_method/auth_services/firebase_auth.dart b/examples/book-store-firebase/api_sdk/lib/firebase_method/auth_services/firebase_auth.dart deleted file mode 100644 index 21565320..00000000 --- a/examples/book-store-firebase/api_sdk/lib/firebase_method/auth_services/firebase_auth.dart +++ /dev/null @@ -1,105 +0,0 @@ -import 'package:api_sdk/models/user.dart'; -import 'package:firebase_auth/firebase_auth.dart'; - -class AuthService { - final FirebaseAuth _auth = FirebaseAuth.instance; - String errorMessage; - - //Create User Object from Firebase User - Future getCurrentUser() async { - try { - final User user = _auth.currentUser; - if (user != null) { - String token = await user.getIdToken(); - return _userFromFirebaseUser(user, token); - } else { - return null; - } - } catch (err) { - errorMessage = getMessageFromErrorCode(err.code); - print(errorMessage); - return Future.error(errorMessage); - } - } - - //Signin With email and password - String getMessageFromErrorCode(errorCode) { - switch (errorCode) { - case "ERROR_EMAIL_ALREADY_IN_USE": - case "account-exists-with-different-credential": - case "email-already-in-use": - return "Email already used. Go to login page."; - break; - case "ERROR_WRONG_PASSWORD": - case "wrong-password": - return "Wrong email/password combination."; - break; - case "ERROR_USER_NOT_FOUND": - case "user-not-found": - return "No user found with this email. Please signUp to continue"; - break; - case "ERROR_USER_DISABLED": - case "user-disabled": - return "User disabled."; - break; - case "ERROR_TOO_MANY_REQUESTS": - case "operation-not-allowed": - return "Too many requests to log into this account."; - break; - case "ERROR_OPERATION_NOT_ALLOWED": - case "operation-not-allowed": - return "Server error, please try again later."; - break; - case "ERROR_INVALID_EMAIL": - case "invalid-email": - return "Email address is invalid."; - break; - case "ERROR_USER_NOT_FOUND": - case "user-not-found": - return "No account found with this email"; - break; - default: - return "Login failed. Please try again."; - break; - } - } - - //Register with email and password - Future registerWithEmailAndPassword(String email, String password) async { - try { - UserCredential userCredential = await _auth - .createUserWithEmailAndPassword(email: email, password: password); - String token = await userCredential.user.getIdToken(); - return _userFromFirebaseUser(userCredential.user, token); - } catch (err) { - errorMessage = getMessageFromErrorCode(err.code); - print(errorMessage); - return Future.error(errorMessage); - } - } - - Future signInWithEmailAndPassword(String email, String password) async { - try { - UserCredential userCredential = await _auth.signInWithEmailAndPassword( - email: email, password: password); - String token = await userCredential.user.getIdToken(); - return _userFromFirebaseUser(userCredential.user, token); - } catch (err) { - errorMessage = getMessageFromErrorCode(err.code); - print(errorMessage); - return Future.error(errorMessage); - } - } - - //signout - Future signOut() async { - return await _auth.signOut(); - } - - //getMessageFromErrorCode - MyUser _userFromFirebaseUser(User user, token) { - return user != null - ? MyUser(uid: user.uid, email: user.email, token: token) - : null; - } -} diff --git a/examples/book-store-firebase/api_sdk/lib/main.dart b/examples/book-store-firebase/api_sdk/lib/main.dart deleted file mode 100644 index d3f19852..00000000 --- a/examples/book-store-firebase/api_sdk/lib/main.dart +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:api_sdk/api_constants.dart'; -import 'package:api_sdk/rest/rest_api_handler_data.dart'; - -class ApiSdk { - static loginWithEmailAndPassword(dynamic body) async { - final response = await RestApiHandlerData.postData( - '${apiConstants["auth"]}/login', body); - return response; - } - - static signUpWithEmailAndPassword(dynamic body) async { - final response = await RestApiHandlerData.postData( - '${apiConstants["auth"]}/register', body); - return response; - } - - static getUserData(int id) async { - final response = - await RestApiHandlerData.getData('${apiConstants["auth"]}/users/$id'); - return response; - } -} diff --git a/examples/book-store-firebase/api_sdk/lib/models/user.dart b/examples/book-store-firebase/api_sdk/lib/models/user.dart deleted file mode 100644 index 9e52b45c..00000000 --- a/examples/book-store-firebase/api_sdk/lib/models/user.dart +++ /dev/null @@ -1,14 +0,0 @@ -class MyUser { - final String uid; - final String email; - final String token; - final String avatar; - - MyUser({ - this.uid, - this.email, - this.token, - this.avatar = - "https://i.pinimg.com/736x/89/90/48/899048ab0cc455154006fdb9676964b3.jpg", - }); -} diff --git a/examples/book-store-firebase/api_sdk/lib/rest/api_helpers/api_base_helper.dart b/examples/book-store-firebase/api_sdk/lib/rest/api_helpers/api_base_helper.dart deleted file mode 100644 index 26fc9682..00000000 --- a/examples/book-store-firebase/api_sdk/lib/rest/api_helpers/api_base_helper.dart +++ /dev/null @@ -1,72 +0,0 @@ -import 'dart:convert'; -import 'dart:io'; - -import 'package:http/http.dart' as http; - -import 'api_exception.dart'; - -dynamic _returnResponse(http.Response response) { - switch (response.statusCode) { - case 200: - var responseJson = json.decode(response.body.toString()); - return responseJson; - case 400: - return json.decode(response.body.toString()); - case 401: - case 403: - return json.decode(response.body.toString()); - case 500: - default: - return FetchDataException( - 'Error occured while Communication with Server with StatusCode : ${response.statusCode}'); - } -} - -class ApiBaseHelper { - Future delete(String url) async { - var apiResponse; - try { - final response = await http.delete(Uri.parse(url)); - apiResponse = _returnResponse(response); - } on SocketException { - throw FetchDataException('No Internet connection'); - } - - return apiResponse; - } - - Future get(String url) async { - var responseJson; - try { - final response = await http.get(Uri.parse(url)); - responseJson = _returnResponse(response); - } on SocketException { - throw FetchDataException('No Internet connection'); - } - return responseJson; - } - - Future post(String url, dynamic body) async { - var responseJson; - try { - final response = await http.post(Uri.parse(url), body: body); - responseJson = _returnResponse(response); - } on SocketException { - throw FetchDataException('No Internet connection'); - } - - return responseJson; - } - - Future put(String url, dynamic body) async { - var responseJson; - try { - final response = await http.put(Uri.parse(url), body: body); - responseJson = _returnResponse(response); - } on SocketException { - throw FetchDataException('No Internet connection'); - } - - return responseJson; - } -} diff --git a/examples/book-store-firebase/api_sdk/lib/rest/api_helpers/api_exception.dart b/examples/book-store-firebase/api_sdk/lib/rest/api_helpers/api_exception.dart deleted file mode 100644 index acdc758e..00000000 --- a/examples/book-store-firebase/api_sdk/lib/rest/api_helpers/api_exception.dart +++ /dev/null @@ -1,27 +0,0 @@ -class AppException implements Exception { - final _message; - final _prefix; - - AppException([this._message, this._prefix]); - - String toString() { - return "$_prefix$_message"; - } -} - -class FetchDataException extends AppException { - FetchDataException([String message]) - : super(message, "Error During Communication: "); -} - -class BadRequestException extends AppException { - BadRequestException([message]) : super(message, "Invalid Request: "); -} - -class UnauthorisedException extends AppException { - UnauthorisedException([message]) : super(message, "Unauthorised: "); -} - -class InvalidInputException extends AppException { - InvalidInputException([String message]) : super(message, "Invalid Input: "); -} diff --git a/examples/book-store-firebase/api_sdk/lib/rest/rest_api_handler_data.dart b/examples/book-store-firebase/api_sdk/lib/rest/rest_api_handler_data.dart deleted file mode 100644 index 8dd7e51b..00000000 --- a/examples/book-store-firebase/api_sdk/lib/rest/rest_api_handler_data.dart +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:api_sdk/rest/api_helpers/api_base_helper.dart'; - -class RestApiHandlerData { - static ApiBaseHelper _apiBaseHelper = ApiBaseHelper(); - static getData(String path) async { - final response = await _apiBaseHelper.get('$path'); - return response; - } - - static postData(String path, dynamic body) async { - final response = await _apiBaseHelper.post('$path', body); - return response; - } -} diff --git a/examples/book-store-firebase/api_sdk/pubspec.lock b/examples/book-store-firebase/api_sdk/pubspec.lock deleted file mode 100644 index 983e4bc5..00000000 --- a/examples/book-store-firebase/api_sdk/pubspec.lock +++ /dev/null @@ -1,565 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - args: - dependency: transitive - description: - name: args - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.0" - async: - dependency: transitive - description: - name: async - url: "https://pub.dartlang.org" - source: hosted - version: "2.8.2" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - characters: - dependency: transitive - description: - name: characters - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - clock: - dependency: transitive - description: - name: clock - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - cloud_firestore: - dependency: "direct main" - description: - name: cloud_firestore - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.10" - cloud_firestore_platform_interface: - dependency: transitive - description: - name: cloud_firestore_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "5.5.1" - cloud_firestore_web: - dependency: transitive - description: - name: cloud_firestore_web - url: "https://pub.dartlang.org" - source: hosted - version: "2.6.10" - collection: - dependency: transitive - description: - name: collection - url: "https://pub.dartlang.org" - source: hosted - version: "1.15.0" - connectivity_plus: - dependency: transitive - description: - name: connectivity_plus - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.1" - connectivity_plus_linux: - dependency: transitive - description: - name: connectivity_plus_linux - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - connectivity_plus_macos: - dependency: transitive - description: - name: connectivity_plus_macos - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.1" - connectivity_plus_platform_interface: - dependency: transitive - description: - name: connectivity_plus_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_web: - dependency: transitive - description: - name: connectivity_plus_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_windows: - dependency: transitive - description: - name: connectivity_plus_windows - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - crypto: - dependency: transitive - description: - name: crypto - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.4" - dbus: - dependency: transitive - description: - name: dbus - url: "https://pub.dartlang.org" - source: hosted - version: "0.7.1" - equatable: - dependency: "direct main" - description: - name: equatable - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - fake_async: - dependency: transitive - description: - name: fake_async - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - ffi: - dependency: transitive - description: - name: ffi - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.2" - file: - dependency: transitive - description: - name: file - url: "https://pub.dartlang.org" - source: hosted - version: "6.1.2" - firebase_auth: - dependency: "direct main" - description: - name: firebase_auth - url: "https://pub.dartlang.org" - source: hosted - version: "3.3.11" - firebase_auth_platform_interface: - dependency: transitive - description: - name: firebase_auth_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "6.2.1" - firebase_auth_web: - dependency: transitive - description: - name: firebase_auth_web - url: "https://pub.dartlang.org" - source: hosted - version: "3.3.9" - firebase_core: - dependency: "direct main" - description: - name: firebase_core - url: "https://pub.dartlang.org" - source: hosted - version: "1.13.1" - firebase_core_platform_interface: - dependency: transitive - description: - name: firebase_core_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "4.2.5" - firebase_core_web: - dependency: transitive - description: - name: firebase_core_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.6.1" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - freezed_annotation: - dependency: "direct main" - description: - name: freezed_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - get_it: - dependency: "direct main" - description: - name: get_it - url: "https://pub.dartlang.org" - source: hosted - version: "7.2.0" - gql: - dependency: "direct main" - description: - name: gql - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.0" - gql_dedupe_link: - dependency: transitive - description: - name: gql_dedupe_link - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - gql_error_link: - dependency: transitive - description: - name: gql_error_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - gql_exec: - dependency: transitive - description: - name: gql_exec - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.0" - gql_http_link: - dependency: transitive - description: - name: gql_http_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.0" - gql_link: - dependency: transitive - description: - name: gql_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.0" - gql_transform_link: - dependency: transitive - description: - name: gql_transform_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - graphql: - dependency: "direct main" - description: - name: graphql - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.1" - graphql_flutter: - dependency: "direct main" - description: - name: graphql_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.1" - hive: - dependency: transitive - description: - name: hive - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - http: - dependency: "direct main" - description: - name: http - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.4" - http_parser: - dependency: transitive - description: - name: http_parser - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.0" - intl: - dependency: transitive - description: - name: intl - url: "https://pub.dartlang.org" - source: hosted - version: "0.17.0" - js: - dependency: transitive - description: - name: js - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.3" - json_annotation: - dependency: transitive - description: - name: json_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "4.4.0" - matcher: - dependency: transitive - description: - name: matcher - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.11" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.3" - meta: - dependency: transitive - description: - name: meta - url: "https://pub.dartlang.org" - source: hosted - version: "1.7.0" - nm: - dependency: transitive - description: - name: nm - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.0" - normalize: - dependency: transitive - description: - name: normalize - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.0+1" - path: - dependency: transitive - description: - name: path - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0" - path_provider: - dependency: transitive - description: - name: path_provider - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.9" - path_provider_android: - dependency: transitive - description: - name: path_provider_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.12" - path_provider_ios: - dependency: transitive - description: - name: path_provider_ios - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.8" - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.5" - path_provider_macos: - dependency: transitive - description: - name: path_provider_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - petitparser: - dependency: transitive - description: - name: petitparser - url: "https://pub.dartlang.org" - source: hosted - version: "4.4.0" - platform: - dependency: transitive - description: - name: platform - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.2" - process: - dependency: transitive - description: - name: process - url: "https://pub.dartlang.org" - source: hosted - version: "4.2.4" - rxdart: - dependency: transitive - description: - name: rxdart - url: "https://pub.dartlang.org" - source: hosted - version: "0.27.3" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_span: - dependency: transitive - description: - name: source_span - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.1" - stack_trace: - dependency: transitive - description: - name: stack_trace - url: "https://pub.dartlang.org" - source: hosted - version: "1.10.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - test_api: - dependency: transitive - description: - name: test_api - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.8" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - uuid: - dependency: transitive - description: - name: uuid - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.6" - vector_math: - dependency: transitive - description: - name: vector_math - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - win32: - dependency: transitive - description: - name: win32 - url: "https://pub.dartlang.org" - source: hosted - version: "2.4.2" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0+1" - xml: - dependency: transitive - description: - name: xml - url: "https://pub.dartlang.org" - source: hosted - version: "5.3.1" -sdks: - dart: ">=2.16.0 <3.0.0" - flutter: ">=2.8.0" diff --git a/examples/book-store-firebase/api_sdk/pubspec.yaml b/examples/book-store-firebase/api_sdk/pubspec.yaml deleted file mode 100644 index e69af646..00000000 --- a/examples/book-store-firebase/api_sdk/pubspec.yaml +++ /dev/null @@ -1,87 +0,0 @@ -name: api_sdk -description: A new Flutter project. - -# The following line prevents the package from being accidentally published to -# pub.dev using `pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev - -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.0+1 - -environment: - sdk: ">=2.7.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.0 - http: - cloud_firestore: ^3.1.10 - firebase_core: ^1.13.1 - firebase_auth: - get_it: ^7.2.0 - graphql: ^5.0.1 - graphql_flutter: ^5.0.1 - gql: ^0.13.0 - freezed_annotation: ^1.1.0 - - equatable: ^2.0.3 - -dev_dependencies: - flutter_test: - sdk: flutter - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter. -flutter: - - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. - uses-material-design: true - - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware. - - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/assets-and-images/#from-packages - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/custom-fonts/#from-packages diff --git a/examples/book-store-firebase/api_sdk/test/widget_test.dart b/examples/book-store-firebase/api_sdk/test/widget_test.dart deleted file mode 100644 index 570e0e47..00000000 --- a/examples/book-store-firebase/api_sdk/test/widget_test.dart +++ /dev/null @@ -1,8 +0,0 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility that Flutter provides. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - -void main() {} diff --git a/examples/book-store-firebase/app/.gitignore b/examples/book-store-firebase/app/.gitignore deleted file mode 100644 index 0fa6b675..00000000 --- a/examples/book-store-firebase/app/.gitignore +++ /dev/null @@ -1,46 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json - -# Android Studio will place build artifacts here -/android/app/debug -/android/app/profile -/android/app/release diff --git a/examples/book-store-firebase/app/.metadata b/examples/book-store-firebase/app/.metadata deleted file mode 100644 index 5a023280..00000000 --- a/examples/book-store-firebase/app/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 7e9793dee1b85a243edd0e06cb1658e98b077561 - channel: stable - -project_type: app diff --git a/examples/book-store-firebase/app/README.md b/examples/book-store-firebase/app/README.md deleted file mode 100644 index e7694a28..00000000 --- a/examples/book-store-firebase/app/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# app - -A new Flutter project. - -## Getting Started - -This project is a starting point for a Flutter application. - -A few resources to get you started if this is your first Flutter project: - -- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) - -For help getting started with Flutter, view our -[online documentation](https://flutter.dev/docs), which offers tutorials, -samples, guidance on mobile development, and a full API reference. diff --git a/examples/book-store-firebase/app/analysis_options.yaml b/examples/book-store-firebase/app/analysis_options.yaml deleted file mode 100644 index 61b6c4de..00000000 --- a/examples/book-store-firebase/app/analysis_options.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# This file configures the analyzer, which statically analyzes Dart code to -# check for errors, warnings, and lints. -# -# The issues identified by the analyzer are surfaced in the UI of Dart-enabled -# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be -# invoked from the command line by running `flutter analyze`. - -# 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 - -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` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at - # https://dart-lang.github.io/linter/lints/index.html. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. - rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/examples/book-store-firebase/app/android/app/build.gradle b/examples/book-store-firebase/app/android/app/build.gradle deleted file mode 100644 index 2a6af6eb..00000000 --- a/examples/book-store-firebase/app/android/app/build.gradle +++ /dev/null @@ -1,68 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion flutter.compileSdkVersion - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = '1.8' - } - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.app" - minSdkVersion flutter.minSdkVersion - targetSdkVersion flutter.targetSdkVersion - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/examples/book-store-firebase/app/android/app/src/debug/AndroidManifest.xml b/examples/book-store-firebase/app/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index 99f406bd..00000000 --- a/examples/book-store-firebase/app/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/examples/book-store-firebase/app/android/app/src/main/AndroidManifest.xml b/examples/book-store-firebase/app/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 3f2d4034..00000000 --- a/examples/book-store-firebase/app/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - diff --git a/examples/book-store-firebase/app/android/app/src/main/kotlin/com/example/app/MainActivity.kt b/examples/book-store-firebase/app/android/app/src/main/kotlin/com/example/app/MainActivity.kt deleted file mode 100644 index 461fcfba..00000000 --- a/examples/book-store-firebase/app/android/app/src/main/kotlin/com/example/app/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.app - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/examples/book-store-firebase/app/android/app/src/main/res/drawable-v21/launch_background.xml b/examples/book-store-firebase/app/android/app/src/main/res/drawable-v21/launch_background.xml deleted file mode 100644 index f74085f3..00000000 --- a/examples/book-store-firebase/app/android/app/src/main/res/drawable-v21/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/examples/book-store-firebase/app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/examples/book-store-firebase/app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b..00000000 Binary files a/examples/book-store-firebase/app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/examples/book-store-firebase/app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/examples/book-store-firebase/app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79..00000000 Binary files a/examples/book-store-firebase/app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/examples/book-store-firebase/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/examples/book-store-firebase/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d43914..00000000 Binary files a/examples/book-store-firebase/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/book-store-firebase/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/examples/book-store-firebase/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d3..00000000 Binary files a/examples/book-store-firebase/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/book-store-firebase/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/examples/book-store-firebase/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372ee..00000000 Binary files a/examples/book-store-firebase/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/book-store-firebase/app/android/app/src/main/res/values-night/styles.xml b/examples/book-store-firebase/app/android/app/src/main/res/values-night/styles.xml deleted file mode 100644 index 3db14bb5..00000000 --- a/examples/book-store-firebase/app/android/app/src/main/res/values-night/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/examples/book-store-firebase/app/android/build.gradle b/examples/book-store-firebase/app/android/build.gradle deleted file mode 100644 index 4256f917..00000000 --- a/examples/book-store-firebase/app/android/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -buildscript { - ext.kotlin_version = '1.6.10' - repositories { - google() - mavenCentral() - } - - dependencies { - classpath 'com.android.tools.build:gradle:4.1.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - mavenCentral() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/examples/book-store-firebase/app/android/gradle/wrapper/gradle-wrapper.properties b/examples/book-store-firebase/app/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index bc6a58af..00000000 --- a/examples/book-store-firebase/app/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip diff --git a/examples/book-store-firebase/app/android/settings.gradle b/examples/book-store-firebase/app/android/settings.gradle deleted file mode 100644 index 44e62bcf..00000000 --- a/examples/book-store-firebase/app/android/settings.gradle +++ /dev/null @@ -1,11 +0,0 @@ -include ':app' - -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() - -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } - -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/examples/book-store-firebase/app/assets/books/kafkaontheshore.jpg b/examples/book-store-firebase/app/assets/books/kafkaontheshore.jpg deleted file mode 100644 index 7eda8d5c..00000000 Binary files a/examples/book-store-firebase/app/assets/books/kafkaontheshore.jpg and /dev/null differ diff --git a/examples/book-store-firebase/app/assets/books/loveisadogfromhell.jpg b/examples/book-store-firebase/app/assets/books/loveisadogfromhell.jpg deleted file mode 100644 index bc098b89..00000000 Binary files a/examples/book-store-firebase/app/assets/books/loveisadogfromhell.jpg and /dev/null differ diff --git a/examples/book-store-firebase/app/assets/books/norwegian.jpg b/examples/book-store-firebase/app/assets/books/norwegian.jpg deleted file mode 100644 index 6786fc2f..00000000 Binary files a/examples/book-store-firebase/app/assets/books/norwegian.jpg and /dev/null differ diff --git a/examples/book-store-firebase/app/assets/books/pulpfiction.jpg b/examples/book-store-firebase/app/assets/books/pulpfiction.jpg deleted file mode 100644 index 93787530..00000000 Binary files a/examples/book-store-firebase/app/assets/books/pulpfiction.jpg and /dev/null differ diff --git a/examples/book-store-firebase/app/assets/books/women.jpg b/examples/book-store-firebase/app/assets/books/women.jpg deleted file mode 100644 index db4def77..00000000 Binary files a/examples/book-store-firebase/app/assets/books/women.jpg and /dev/null differ diff --git a/examples/book-store-firebase/app/assets/images/2.0x/logo.png b/examples/book-store-firebase/app/assets/images/2.0x/logo.png deleted file mode 100644 index f2c967ff..00000000 Binary files a/examples/book-store-firebase/app/assets/images/2.0x/logo.png and /dev/null differ diff --git a/examples/book-store-firebase/app/assets/images/3.0x/logo.png b/examples/book-store-firebase/app/assets/images/3.0x/logo.png deleted file mode 100644 index 6b5dcc95..00000000 Binary files a/examples/book-store-firebase/app/assets/images/3.0x/logo.png and /dev/null differ diff --git a/examples/book-store-firebase/app/assets/images/logo.png b/examples/book-store-firebase/app/assets/images/logo.png deleted file mode 100644 index aba93c52..00000000 Binary files a/examples/book-store-firebase/app/assets/images/logo.png and /dev/null differ diff --git a/examples/book-store-firebase/app/ios/Flutter/AppFrameworkInfo.plist b/examples/book-store-firebase/app/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 8d4492f9..00000000 --- a/examples/book-store-firebase/app/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 9.0 - - diff --git a/examples/book-store-firebase/app/ios/Flutter/Debug.xcconfig b/examples/book-store-firebase/app/ios/Flutter/Debug.xcconfig deleted file mode 100644 index 592ceee8..00000000 --- a/examples/book-store-firebase/app/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/examples/book-store-firebase/app/ios/Flutter/Release.xcconfig b/examples/book-store-firebase/app/ios/Flutter/Release.xcconfig deleted file mode 100644 index 592ceee8..00000000 --- a/examples/book-store-firebase/app/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/examples/book-store-firebase/app/ios/Runner.xcodeproj/project.pbxproj b/examples/book-store-firebase/app/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index fb16edd3..00000000 --- a/examples/book-store-firebase/app/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,481 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 50; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - ); - path = Runner; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1300; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 1100; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - 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_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - 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_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.app; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - 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_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - 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_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - 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_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - 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_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - 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_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.app; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.app; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/examples/book-store-firebase/app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/book-store-firebase/app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6..00000000 --- a/examples/book-store-firebase/app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/examples/book-store-firebase/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/book-store-firebase/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5..00000000 --- a/examples/book-store-firebase/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/examples/book-store-firebase/app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/book-store-firebase/app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5..00000000 --- a/examples/book-store-firebase/app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d36b1fab..00000000 --- a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "Icon-App-1024x1024@1x.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada47..00000000 Binary files a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf03..00000000 Binary files a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd96..00000000 Binary files a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0..00000000 Binary files a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde1211..00000000 Binary files a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7..00000000 Binary files a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306..00000000 Binary files a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd96..00000000 Binary files a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f..00000000 Binary files a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b860..00000000 Binary files a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b860..00000000 Binary files a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164..00000000 Binary files a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d3..00000000 Binary files a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e..00000000 Binary files a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f585..00000000 Binary files a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 0bedcf2f..00000000 --- a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "LaunchImage.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b..00000000 --- a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/examples/book-store-firebase/app/ios/Runner/Base.lproj/Main.storyboard b/examples/book-store-firebase/app/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516..00000000 --- a/examples/book-store-firebase/app/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/book-store-firebase/app/ios/Runner/Info.plist b/examples/book-store-firebase/app/ios/Runner/Info.plist deleted file mode 100644 index 00943528..00000000 --- a/examples/book-store-firebase/app/ios/Runner/Info.plist +++ /dev/null @@ -1,47 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleDisplayName - App - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - app - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/examples/book-store-firebase/app/ios/Runner/Runner-Bridging-Header.h b/examples/book-store-firebase/app/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 308a2a56..00000000 --- a/examples/book-store-firebase/app/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" diff --git a/examples/book-store-firebase/app/lib/main.dart b/examples/book-store-firebase/app/lib/main.dart deleted file mode 100644 index 2757656c..00000000 --- a/examples/book-store-firebase/app/lib/main.dart +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:app/src/app.dart'; -import 'package:app/src/utils/app_state_notifier.dart'; -import 'package:firebase_core/firebase_core.dart'; -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:shared/main.dart'; - -void main() async { - WidgetsFlutterBinding.ensureInitialized(); - await Firebase.initializeApp(); - setupLocator(); - runApp( - ChangeNotifierProvider( - create: (_) => AppStateNotifier(), - child: App(), - ), - ); -} diff --git a/examples/book-store-firebase/app/lib/src/app.dart b/examples/book-store-firebase/app/lib/src/app.dart deleted file mode 100644 index 2407010e..00000000 --- a/examples/book-store-firebase/app/lib/src/app.dart +++ /dev/null @@ -1,27 +0,0 @@ -import 'package:app/src/config/theme_data.dart'; -import 'package:app/src/routes/index.dart'; -import 'package:app/src/utils/app_state_notifier.dart'; -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:shared/main.dart'; - -class App extends StatelessWidget { - Widget build(BuildContext context) { - return Consumer(builder: (context, appState, child) { - return MultiProvider( - providers: [ - ChangeNotifierProvider( - create: (_) => locator(), - ), - ], - child: MaterialApp( - title: 'News!', - theme: ThemeConfig.lightTheme, - darkTheme: ThemeConfig.darkTheme, - themeMode: appState.isDarkMode ? ThemeMode.dark : ThemeMode.light, - onGenerateRoute: routes, - ), - ); - }); - } -} diff --git a/examples/book-store-firebase/app/lib/src/config/color_constants.dart b/examples/book-store-firebase/app/lib/src/config/color_constants.dart deleted file mode 100644 index 9cdf86a8..00000000 --- a/examples/book-store-firebase/app/lib/src/config/color_constants.dart +++ /dev/null @@ -1,20 +0,0 @@ -import 'dart:ui'; -import 'package:flutter/material.dart'; - -Color hexToColor(String hex) { - assert(RegExp(r'^#([0-9a-fA-F]{6})|([0-9a-fA-F]{8})$').hasMatch(hex), - 'hex color must be #rrggbb or #rrggbbaa'); - - return Color( - int.parse(hex.substring(1), radix: 16) + - (hex.length == 7 ? 0xff000000 : 0x00000000), - ); -} - -class ColorConstants { - static Color lightScaffoldBackgroundColor = hexToColor('#F9F9F9'); - static Color darkScaffoldBackgroundColor = hexToColor('#2F2E2E'); - static Color secondaryAppColor = hexToColor('#5E92F3'); - - static Color secondaryDarkAppColor = Colors.white; -} diff --git a/examples/book-store-firebase/app/lib/src/config/image_constants.dart b/examples/book-store-firebase/app/lib/src/config/image_constants.dart deleted file mode 100644 index d9b8d082..00000000 --- a/examples/book-store-firebase/app/lib/src/config/image_constants.dart +++ /dev/null @@ -1,9 +0,0 @@ -class AllImages { - AllImages._(); - static AllImages _instance = AllImages._(); - factory AllImages() => _instance; - String image = 'assets/image'; - String logo = 'assets/images/logo.png'; - String kDefaultImage = - 'https://cdn.pixabay.com/photo/2016/08/08/09/17/avatar-1577909_1280.png'; -} diff --git a/examples/book-store-firebase/app/lib/src/config/string_constants.dart b/examples/book-store-firebase/app/lib/src/config/string_constants.dart deleted file mode 100644 index 3040c66a..00000000 --- a/examples/book-store-firebase/app/lib/src/config/string_constants.dart +++ /dev/null @@ -1,16 +0,0 @@ -library constants; - -// Onboarding Screens -const String app_name = "APP NAME"; - -// tabs -const String tab0 = "Tab 0"; -const String tab1 = "Tab 1"; -const String tab2 = "Tab 2"; -const String tab3 = "Tab 3"; - -//Screen 1 -const String screen_util = "Screen"; - -//home -const String app_bar_title = 'Book store'; diff --git a/examples/book-store-firebase/app/lib/src/config/theme_data.dart b/examples/book-store-firebase/app/lib/src/config/theme_data.dart deleted file mode 100644 index 07425035..00000000 --- a/examples/book-store-firebase/app/lib/src/config/theme_data.dart +++ /dev/null @@ -1,217 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; - -import 'color_constants.dart'; - -class ThemeConfig { - static ThemeData get darkTheme => createTheme( - brightness: Brightness.dark, - background: ColorConstants.darkScaffoldBackgroundColor, - cardBackground: ColorConstants.secondaryDarkAppColor, - primaryText: Colors.white, - secondaryText: Colors.black, - accentColor: ColorConstants.secondaryDarkAppColor, - divider: Colors.black45, - buttonBackground: Colors.white, - buttonText: ColorConstants.secondaryDarkAppColor, - disabled: ColorConstants.secondaryDarkAppColor, - error: Colors.red, - ); - - static ThemeData get lightTheme => createTheme( - brightness: Brightness.light, - background: ColorConstants.lightScaffoldBackgroundColor, - cardBackground: ColorConstants.secondaryAppColor, - primaryText: Colors.black, - secondaryText: Colors.white, - accentColor: ColorConstants.secondaryAppColor, - divider: ColorConstants.secondaryAppColor, - buttonBackground: Colors.black38, - buttonText: ColorConstants.secondaryAppColor, - disabled: ColorConstants.secondaryAppColor, - error: Colors.red, - ); - - static ThemeData createTheme({ - Brightness brightness, - Color background, - Color primaryText, - Color secondaryText, - Color accentColor, - Color divider, - Color buttonBackground, - Color buttonText, - Color cardBackground, - Color disabled, - Color error, - }) { - final baseTextTheme = brightness == Brightness.dark - ? Typography.blackMountainView - : Typography.whiteMountainView; - - return ThemeData( - brightness: brightness, - canvasColor: background, - cardColor: background, - dividerColor: divider, - dividerTheme: DividerThemeData( - color: divider, - space: 1, - thickness: 1, - ), - cardTheme: CardTheme( - color: cardBackground, - margin: EdgeInsets.zero, - clipBehavior: Clip.antiAliasWithSaveLayer, - ), - elevatedButtonTheme: ElevatedButtonThemeData( - style: ButtonStyle( - shape: MaterialStateProperty.all( - RoundedRectangleBorder( - borderRadius: BorderRadius.circular(18.0), - side: BorderSide(color: Colors.red))), - padding: MaterialStateProperty.all( - const EdgeInsets.all(16)))), - backgroundColor: background, - primaryColor: accentColor, - toggleableActiveColor: accentColor, - appBarTheme: AppBarTheme( - systemOverlayStyle: - SystemUiOverlayStyle(statusBarBrightness: brightness), - color: cardBackground, - iconTheme: IconThemeData( - color: secondaryText, - ), - toolbarTextStyle: TextTheme( - bodyText1: baseTextTheme.bodyText1.copyWith( - color: secondaryText, - fontSize: 18, - ), - ).bodyText2, - titleTextStyle: TextTheme( - bodyText1: baseTextTheme.bodyText1.copyWith( - color: secondaryText, - fontSize: 18, - ), - ).headline6, - ), - iconTheme: IconThemeData( - color: secondaryText, - size: 16.0, - ), - errorColor: error, - buttonTheme: ButtonThemeData( - textTheme: ButtonTextTheme.primary, - colorScheme: ColorScheme( - brightness: brightness, - primary: accentColor, - primaryVariant: accentColor, - secondary: accentColor, - secondaryVariant: accentColor, - surface: background, - background: background, - error: error, - onPrimary: buttonText, - onSecondary: buttonText, - onSurface: buttonText, - onBackground: buttonText, - onError: buttonText, - ), - padding: const EdgeInsets.all(16.0), - ), - cupertinoOverrideTheme: CupertinoThemeData( - brightness: brightness, - primaryColor: accentColor, - ), - inputDecorationTheme: InputDecorationTheme( - errorStyle: TextStyle(color: error), - labelStyle: TextStyle( - fontFamily: '', - fontWeight: FontWeight.w600, - fontSize: 16.0, - color: primaryText.withOpacity(0.5), - ), - hintStyle: TextStyle( - color: secondaryText, - fontSize: 13.0, - fontWeight: FontWeight.w300, - ), - ), - fontFamily: '', - textTheme: TextTheme( - headline1: baseTextTheme.headline1.copyWith( - color: primaryText, - fontSize: 34.0, - fontWeight: FontWeight.bold, - ), - headline2: baseTextTheme.headline2.copyWith( - color: primaryText, - fontSize: 22, - fontWeight: FontWeight.bold, - ), - headline3: baseTextTheme.headline3.copyWith( - color: secondaryText, - fontSize: 20, - fontWeight: FontWeight.w600, - ), - headline4: baseTextTheme.headline4.copyWith( - color: primaryText, - fontSize: 18, - fontWeight: FontWeight.w600, - ), - headline5: baseTextTheme.headline5.copyWith( - color: primaryText, - fontSize: 16, - fontWeight: FontWeight.w700, - ), - headline6: baseTextTheme.headline6.copyWith( - color: primaryText, - fontSize: 14, - fontWeight: FontWeight.w700, - ), - bodyText1: baseTextTheme.bodyText1.copyWith( - color: secondaryText, - fontSize: 15, - ), - bodyText2: baseTextTheme.bodyText2.copyWith( - color: primaryText, - fontSize: 12, - fontWeight: FontWeight.w400, - ), - button: baseTextTheme.button.copyWith( - color: primaryText, - fontSize: 12.0, - fontWeight: FontWeight.w700, - ), - caption: baseTextTheme.caption.copyWith( - color: primaryText, - fontSize: 11.0, - fontWeight: FontWeight.w300, - ), - overline: baseTextTheme.overline.copyWith( - color: secondaryText, - fontSize: 11.0, - fontWeight: FontWeight.w500, - ), - subtitle1: baseTextTheme.subtitle1.copyWith( - color: primaryText, - fontSize: 16.0, - fontWeight: FontWeight.w700, - ), - subtitle2: baseTextTheme.subtitle2.copyWith( - color: secondaryText, - fontSize: 11.0, - fontWeight: FontWeight.w500, - ), - ), - colorScheme: ColorScheme.fromSwatch() - .copyWith(secondary: accentColor, brightness: brightness), - textSelectionTheme: TextSelectionThemeData( - cursorColor: accentColor, - selectionColor: accentColor, - selectionHandleColor: accentColor, - ), - ); - } -} diff --git a/examples/book-store-firebase/app/lib/src/routes/index.dart b/examples/book-store-firebase/app/lib/src/routes/index.dart deleted file mode 100644 index 58aae6e8..00000000 --- a/examples/book-store-firebase/app/lib/src/routes/index.dart +++ /dev/null @@ -1,21 +0,0 @@ -// routes for the app -import 'package:app/src/screens/home/index.dart'; -import 'package:app/src/screens/onboarding/authentication_screen.dart'; -import 'package:app/src/screens/bookstore/add_books.dart'; -import 'package:app/src/splash_screen.dart'; -import 'package:flutter/material.dart'; - -Route routes(RouteSettings settings) { - switch (settings.name) { - case '/': - return MaterialPageRoute(builder: (_) => SplashScreen()); - case '/home': - return MaterialPageRoute(builder: (_) => HomeScreen()); - case '/auth': - return MaterialPageRoute(builder: (_) => AuthenticationScreen()); - case '/addBooks': - return MaterialPageRoute(builder: (_) => AddBooks()); - default: - return MaterialPageRoute(builder: (_) => SplashScreen()); - } -} diff --git a/examples/book-store-firebase/app/lib/src/screens/bookstore/add_books.dart b/examples/book-store-firebase/app/lib/src/screens/bookstore/add_books.dart deleted file mode 100644 index 6f9fb60d..00000000 --- a/examples/book-store-firebase/app/lib/src/screens/bookstore/add_books.dart +++ /dev/null @@ -1,116 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:shared/main.dart'; - -class AddBooks extends StatefulWidget { - @override - _AddBooksState createState() => _AddBooksState(); -} - -class _AddBooksState extends State { - final _formKey = GlobalKey(); - String bookType = 'Pulp Fiction'; - String title; - String author; - - @override - Widget build(BuildContext context) { - var bookstoreProvider = Provider.of(context); - return Scaffold( - appBar: AppBar( - title: Text('Add Books'), - ), - body: ListView( - shrinkWrap: true, - children: [ - Padding( - padding: const EdgeInsets.all(16.0), - child: Form( - key: _formKey, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - TextFormField( - decoration: InputDecoration( - labelText: 'Book Title', - filled: true, - isDense: true, - ), - autocorrect: false, - validator: (value) { - if (value.isEmpty) { - return 'Please enter Book Title'; - } - return null; - }, - onSaved: (value) => title = value), - SizedBox( - height: 16, - ), - TextFormField( - decoration: InputDecoration( - labelText: 'Author', - filled: true, - isDense: true, - ), - autocorrect: false, - validator: (value) { - if (value.isEmpty) { - return 'Please enter The author'; - } - return null; - }, - onSaved: (value) => author = value), - SizedBox( - height: 16, - ), - DropdownButton( - iconSize: 24, - value: bookType, - onChanged: (String newValue) { - setState(() { - bookType = newValue; - }); - }, - items: [ - 'Pulp Fiction', - 'Love is a dog from hell', - 'Kafka on the shore', - 'Norwegian', - 'Women' - ].map>((String value) { - return DropdownMenuItem( - value: value, - child: Text(value), - ); - }).toList(), - ), - ], - ), - ), - ), - Padding( - padding: const EdgeInsets.all(16.0), - child: RaisedButton( - onPressed: () async { - if (_formKey.currentState.validate()) { - _formKey.currentState.save(); - await bookstoreProvider.addBookStore(BookStore( - name: title, - author: author, - img: - '${bookType.replaceAll(' ', '').toLowerCase()}.jpg')); - Navigator.pop(context); - } else { - print('no Validate'); - } - }, - child: Text('Add book'), - ), - ) - ], - ), - ); - } -} diff --git a/examples/book-store-firebase/app/lib/src/screens/bookstore/book_card.dart b/examples/book-store-firebase/app/lib/src/screens/bookstore/book_card.dart deleted file mode 100644 index d40248c7..00000000 --- a/examples/book-store-firebase/app/lib/src/screens/bookstore/book_card.dart +++ /dev/null @@ -1,51 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:shared/main.dart'; -import 'package:app/src/screens/bookstore/book_details.dart'; - -class BookCard extends StatelessWidget { - final BookStore bookStoreDetails; - - BookCard({@required this.bookStoreDetails}); - - @override - Widget build(BuildContext context) { - return GestureDetector( - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (_) => BookDetails(bookDetails: bookStoreDetails))); - }, - child: Padding( - padding: EdgeInsets.all(8), - child: Container( - child: Column( - children: [ - Hero( - tag: bookStoreDetails.id, - child: Card( - elevation: 6, - color: Colors.transparent, - child: Image.asset( - 'assets/books/${bookStoreDetails.img}', - height: MediaQuery.of(context).size.height / 3, - ), - ), - ), - SizedBox( - height: 22, - ), - Text(bookStoreDetails.name, - textAlign: TextAlign.center, - style: Theme.of(context).textTheme.headline2), - Text( - 'Author ${bookStoreDetails.author}', - style: Theme.of(context).textTheme.overline, - ), - ], - ), - ), - ), - ); - } -} diff --git a/examples/book-store-firebase/app/lib/src/screens/bookstore/book_details.dart b/examples/book-store-firebase/app/lib/src/screens/bookstore/book_details.dart deleted file mode 100644 index 34f2c2a9..00000000 --- a/examples/book-store-firebase/app/lib/src/screens/bookstore/book_details.dart +++ /dev/null @@ -1,75 +0,0 @@ -import 'package:app/src/screens/bookstore/modify_books.dart'; -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:shared/main.dart'; - -class BookDetails extends StatelessWidget { - final BookStore bookDetails; - - BookDetails({@required this.bookDetails}); - - @override - Widget build(BuildContext context) { - final bookDetailsProvider = Provider.of(context); - - return Scaffold( - appBar: AppBar( - title: Text('Book Details'), - actions: [ - IconButton( - icon: Icon(Icons.delete_forever), - onPressed: () async { - await bookDetailsProvider.removeBookStore(bookDetails.id); - Navigator.pop(context); - }, - ), - IconButton( - icon: Icon(Icons.edit), - onPressed: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (_) => ModifyBooks( - bookStore: bookDetails, - ))); - }, - ) - ], - ), - body: Padding( - padding: const EdgeInsets.all(16.0), - child: SingleChildScrollView( - child: Column( - mainAxisSize: MainAxisSize.max, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Hero( - tag: bookDetails.id, - child: Card( - color: Colors.transparent, - elevation: 6, - child: Image.asset( - 'assets/books/${bookDetails.img}', - ), - ), - ), - SizedBox( - height: 20, - ), - Text(bookDetails.name, - style: Theme.of(context) - .textTheme - .headline2 - .copyWith(fontSize: 32)), - Text('${bookDetails.author}', - style: Theme.of(context) - .textTheme - .overline - .copyWith(fontSize: 24)) - ], - ), - ), - ), - ); - } -} diff --git a/examples/book-store-firebase/app/lib/src/screens/bookstore/modify_books.dart b/examples/book-store-firebase/app/lib/src/screens/bookstore/modify_books.dart deleted file mode 100644 index 8b59f586..00000000 --- a/examples/book-store-firebase/app/lib/src/screens/bookstore/modify_books.dart +++ /dev/null @@ -1,103 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:shared/main.dart'; - -class ModifyBooks extends StatefulWidget { - final BookStore bookStore; - - ModifyBooks({@required this.bookStore}); - @override - _ModifyBooksState createState() => _ModifyBooksState(); -} - -class _ModifyBooksState extends State { - final _formKey = GlobalKey(); - - String title; - String author; - - @override - Widget build(BuildContext context) { - var bookstoreProvider = Provider.of(context); - - return Scaffold( - appBar: AppBar( - title: Text('Modify details'), - ), - body: ListView( - shrinkWrap: true, - children: [ - Padding( - padding: const EdgeInsets.all(16.0), - child: Form( - key: _formKey, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - TextFormField( - initialValue: widget.bookStore.name, - decoration: InputDecoration( - labelText: 'Book Title', - filled: true, - isDense: true, - ), - autocorrect: false, - validator: (value) { - if (value.isEmpty) { - return 'Please enter Book Title'; - } - return null; - }, - onSaved: (value) => title = value), - SizedBox( - height: 16, - ), - TextFormField( - initialValue: widget.bookStore.author, - decoration: InputDecoration( - labelText: 'Author', - filled: true, - isDense: true, - ), - autocorrect: false, - validator: (value) { - if (value.isEmpty) { - return 'Please enter The author'; - } - return null; - }, - onSaved: (value) => author = value), - SizedBox( - height: 16, - ), - ], - ), - ), - ), - Padding( - padding: const EdgeInsets.all(16.0), - child: RaisedButton( - onPressed: () async { - if (_formKey.currentState.validate()) { - _formKey.currentState.save(); - await bookstoreProvider.updateBookStore( - BookStore( - name: title, - author: author, - img: widget.bookStore.img), - widget.bookStore.id); - Navigator.pop(context); - } else { - print('no Validate'); - } - }, - child: Text( - 'Update book details', - )), - ) - ], - ), - ); - } -} diff --git a/examples/book-store-firebase/app/lib/src/screens/home/index.dart b/examples/book-store-firebase/app/lib/src/screens/home/index.dart deleted file mode 100644 index ab1b40a5..00000000 --- a/examples/book-store-firebase/app/lib/src/screens/home/index.dart +++ /dev/null @@ -1,137 +0,0 @@ -// home screen contents -import 'package:app/src/config/image_constants.dart'; -import 'package:app/src/config/string_constants.dart' as string_constants; -import 'package:app/src/screens/bookstore/book_card.dart'; -import 'package:app/src/utils/app_state_notifier.dart'; -import 'package:app/src/widgets/cache_image_widget.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:provider/provider.dart'; -import 'package:shared/main.dart'; - -class HomeScreen extends StatelessWidget { - // ignore: close_sinks - final AuthenticationBloc authenticationBloc = - AuthenticationBlocController().authenticationBloc; - - @override - Widget build(BuildContext context) { - print("Home Screen"); - final bookstoreProvider = Provider.of(context); - authenticationBloc.add(GetUserData()); - List bookstore; - return WillPopScope( - onWillPop: () async => false, - child: BlocBuilder( - bloc: authenticationBloc, - builder: (BuildContext context, AuthenticationState state) { - if (state is SetUserData) { - return Scaffold( - floatingActionButton: FloatingActionButton( - onPressed: () { - Navigator.pushNamed(context, '/addBooks'); - }, - child: Icon( - Icons.add, - size: 24, - ), - ), - appBar: AppBar( - centerTitle: true, - title: Text( - string_constants.app_bar_title, - style: Theme.of(context).appBarTheme.textTheme.bodyText1, - ), - actions: [ - IconButton( - icon: Icon(Icons.logout), - onPressed: () { - authenticationBloc.add(UserLogOut()); - }), - ], - ), - body: Container( - child: FutureBuilder>( - future: bookstoreProvider.fetchBookStores(), - builder: (BuildContext context, - AsyncSnapshot> snapshot) { - if (snapshot.hasData) { - print('hello ${snapshot.data}'); - bookstore = snapshot.data; - return GridView.builder( - gridDelegate: - SliverGridDelegateWithFixedCrossAxisCount( - childAspectRatio: 0.5, crossAxisCount: 2), - itemCount: bookstore.length, - itemBuilder: (buildContext, index) => - BookCard(bookStoreDetails: bookstore[index]), - ); - } else { - return Text('fetching'); - } - }, - ), - ), - drawer: Drawer( - child: ListView( - padding: EdgeInsets.zero, - children: [ - DrawerHeader( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(50), - color: Colors.white), - child: CachedImage( - imageUrl: state.avatar, - fit: BoxFit.fitWidth, - errorWidget: Image.network( - AllImages().kDefaultImage, - ), - width: 80, - height: 80, - placeholder: CircularProgressIndicator(), - ), - ), - Switch( - value: - Provider.of(context) - .isDarkMode, - onChanged: (value) { - Provider.of(context, - listen: false) - .updateTheme(value); - }, - ), - ], - ) - ], - ), - decoration: BoxDecoration( - color: Theme.of(context).dividerColor, - ), - ), - ListTile( - title: Text(state.email, - style: Theme.of(context).textTheme.bodyText2), - ), - ], - ), - ), - ); - } - return Scaffold( - body: Center( - child: CircularProgressIndicator(), - ), - ); - })); - } -} diff --git a/examples/book-store-firebase/app/lib/src/screens/onboarding/authentication_screen.dart b/examples/book-store-firebase/app/lib/src/screens/onboarding/authentication_screen.dart deleted file mode 100644 index 77326694..00000000 --- a/examples/book-store-firebase/app/lib/src/screens/onboarding/authentication_screen.dart +++ /dev/null @@ -1,129 +0,0 @@ -import 'package:app/src/screens/onboarding/login_screen.dart'; -import 'package:app/src/screens/onboarding/signup_screen.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:shared/main.dart'; - -class AuthenticationScreen extends StatefulWidget { - @override - _AuthenticationScreenState createState() => _AuthenticationScreenState(); -} - -class _AuthenticationScreenState extends State { - bool showLoginForm = false; - // ignore: close_sinks - AuthenticationBloc authenticationBloc; - @override - Widget build(BuildContext context) { - void _showError(String error) async { - await Fluttertoast.showToast( - msg: error, - toastLength: Toast.LENGTH_SHORT, - gravity: ToastGravity.BOTTOM, - timeInSecForIosWeb: 3, - backgroundColor: Colors.red, - textColor: Colors.white, - fontSize: 16.0); - } - - return Scaffold( - body: WillPopScope( - onWillPop: () async => false, - child: BlocListener( - bloc: authenticationBloc, - listener: (context, state) { - if (state is AuthenticationFailure) { - _showError(state.message); - } - }, - child: BlocBuilder( - bloc: authenticationBloc, - builder: (BuildContext context, AuthenticationState state) { - return SafeArea( - child: Stack( - children: [ - Center( - child: ListView( - shrinkWrap: true, - children: [ - Center( - child: Text( - showLoginForm ? 'LOGIN' : 'SIGN UP', - style: Theme.of(context).textTheme.headline2, - )), - Padding( - padding: const EdgeInsets.all(32.0), - child: showLoginForm - ? LoginForm( - authenticationBloc: authenticationBloc, - state: state, - ) - : SignUpForm( - authenticationBloc: authenticationBloc, - state: state, - ), - ), - showLoginForm - ? SizedBox() - : Padding( - padding: const EdgeInsets.all(32.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - SizedBox( - height: 38, - ), - Text('Already have an account?'), - SizedBox( - height: 8, - ), - ElevatedButton( - child: Text( - 'Login', - style: Theme.of(context) - .textTheme - .bodyText1, - ), - onPressed: () { - setState(() { - showLoginForm = true; - }); - }) - ], - ), - ) - ], - ), - ), - !showLoginForm - ? SizedBox() - : Positioned( - left: 6, - child: IconButton( - icon: Icon( - Icons.arrow_back_ios, - size: 32, - color: Theme.of(context).primaryColor, - ), - onPressed: () { - setState(() { - showLoginForm = false; - }); - }, - ), - ) - ], - ), - ); - }), - ), - )); - } - - @override - void initState() { - authenticationBloc = AuthenticationBlocController().authenticationBloc; - super.initState(); - } -} diff --git a/examples/book-store-firebase/app/lib/src/screens/onboarding/login_screen.dart b/examples/book-store-firebase/app/lib/src/screens/onboarding/login_screen.dart deleted file mode 100644 index d7a8d57b..00000000 --- a/examples/book-store-firebase/app/lib/src/screens/onboarding/login_screen.dart +++ /dev/null @@ -1,79 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:shared/main.dart'; - -class LoginForm extends StatefulWidget { - final AuthenticationBloc authenticationBloc; - final AuthenticationState state; - LoginForm({this.authenticationBloc, this.state}); - @override - _LoginFormState createState() => _LoginFormState(); -} - -class _LoginFormState extends State { - final GlobalKey _key = GlobalKey(); - final _passwordController = TextEditingController(); - final _emailController = TextEditingController(); - - @override - Widget build(BuildContext context) { - return Form( - key: _key, - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - TextFormField( - decoration: InputDecoration( - labelText: 'Email address', - filled: true, - isDense: true, - ), - controller: _emailController, - keyboardType: TextInputType.emailAddress, - autocorrect: false, - validator: (value) { - if (value.isEmpty) { - return 'Email is required.'; - } - return null; - }, - ), - SizedBox( - height: 12, - ), - TextFormField( - decoration: InputDecoration( - labelText: 'Password', - filled: true, - isDense: true, - ), - obscureText: true, - controller: _passwordController, - validator: (value) { - if (value.isEmpty) { - return 'Password is required.'; - } - return null; - }, - ), - const SizedBox( - height: 16, - ), - ElevatedButton( - child: widget.state is AuthenticationLoading - ? CircularProgressIndicator( - backgroundColor: - Theme.of(context).textTheme.bodyText1.color, - ) - : Text('Login', style: Theme.of(context).textTheme.bodyText1), - onPressed: () { - if (_key.currentState.validate()) { - widget.authenticationBloc.add(UserLogin( - email: _emailController.text, - password: _passwordController.text)); - } else {} - }) - ], - ), - ); - } -} diff --git a/examples/book-store-firebase/app/lib/src/screens/onboarding/signup_screen.dart b/examples/book-store-firebase/app/lib/src/screens/onboarding/signup_screen.dart deleted file mode 100644 index 03eaad47..00000000 --- a/examples/book-store-firebase/app/lib/src/screens/onboarding/signup_screen.dart +++ /dev/null @@ -1,84 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:shared/main.dart'; - -class SignUpForm extends StatefulWidget { - final AuthenticationBloc authenticationBloc; - final AuthenticationState state; - SignUpForm({this.authenticationBloc, this.state}); - @override - _SignUpFormState createState() => _SignUpFormState(); -} - -class _SignUpFormState extends State { - final GlobalKey _key = GlobalKey(); - final _passwordController = TextEditingController(); - final _emailController = TextEditingController(); - - @override - Widget build(BuildContext context) { - return Form( - key: _key, - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - TextFormField( - decoration: InputDecoration( - labelText: 'Email address', - filled: true, - isDense: true, - ), - controller: _emailController, - keyboardType: TextInputType.emailAddress, - autocorrect: false, - validator: (value) { - if (value.isEmpty) { - return 'Email is required.'; - } - return null; - }, - ), - SizedBox( - height: 12, - ), - TextFormField( - decoration: InputDecoration( - labelText: 'Password', - filled: true, - isDense: true, - ), - obscureText: true, - controller: _passwordController, - validator: (value) { - if (value.isEmpty) { - return 'Password is required.'; - } - return null; - }, - ), - const SizedBox( - height: 16, - ), - ElevatedButton( - child: widget.state is AuthenticationLoading - ? CircularProgressIndicator( - backgroundColor: - Theme.of(context).textTheme.bodyText1.color, - ) - : Text( - 'Sign Up', - style: Theme.of(context).textTheme.bodyText1, - ), - onPressed: () { - if (_key.currentState.validate()) { - widget.authenticationBloc.add(UserSignUp( - email: _emailController.text, - password: _passwordController.text)); - } else { - print('Form not validated'); - } - }) - ], - ), - ); - } -} diff --git a/examples/book-store-firebase/app/lib/src/splash_screen.dart b/examples/book-store-firebase/app/lib/src/splash_screen.dart deleted file mode 100644 index 83deeca2..00000000 --- a/examples/book-store-firebase/app/lib/src/splash_screen.dart +++ /dev/null @@ -1,45 +0,0 @@ -import 'package:app/src/config/color_constants.dart'; -import 'package:app/src/config/image_constants.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:shared/main.dart'; - -class SplashScreen extends StatefulWidget { - @override - _SplashScreenState createState() => _SplashScreenState(); -} - -class _SplashScreenState extends State { - AuthenticationBloc authenticationBloc; - @override - Widget build(BuildContext context) { - return Scaffold( - backgroundColor: ColorConstants.secondaryAppColor, - body: BlocListener( - bloc: authenticationBloc, - listener: (BuildContext context, AuthenticationState state) { - if (state is AppAutheticated) { - Navigator.pushNamed(context, '/home'); - } - if (state is AuthenticationStart) { - Navigator.pushNamed(context, '/auth'); - } - if (state is UserLogoutState) { - Navigator.pushNamed(context, '/auth'); - } - }, - child: BlocBuilder( - bloc: authenticationBloc, - builder: (BuildContext context, AuthenticationState state) { - return Center(child: Image.asset(AllImages().logo)); - }), - )); - } - - @override - void initState() { - authenticationBloc = AuthenticationBlocController().authenticationBloc; - authenticationBloc.add(AppLoadedup()); - super.initState(); - } -} diff --git a/examples/book-store-firebase/app/lib/src/utils/app_state_notifier.dart b/examples/book-store-firebase/app/lib/src/utils/app_state_notifier.dart deleted file mode 100644 index 1ddc68ec..00000000 --- a/examples/book-store-firebase/app/lib/src/utils/app_state_notifier.dart +++ /dev/null @@ -1,10 +0,0 @@ -import 'package:flutter/material.dart'; - -class AppStateNotifier extends ChangeNotifier { - bool isDarkMode = false; - - void updateTheme(bool isDarkMode) { - this.isDarkMode = isDarkMode; - notifyListeners(); - } -} diff --git a/examples/book-store-firebase/app/lib/src/utils/size_utils.dart b/examples/book-store-firebase/app/lib/src/utils/size_utils.dart deleted file mode 100644 index b46a5fc1..00000000 --- a/examples/book-store-firebase/app/lib/src/utils/size_utils.dart +++ /dev/null @@ -1,81 +0,0 @@ -import 'package:flutter/material.dart'; - -class SizeConfig { - SizeConfig._(); - static SizeConfig _instance = SizeConfig._(); - factory SizeConfig() => _instance; - - MediaQueryData _mediaQueryData; - double screenWidth; - double screenHeight; - double blockSizeHorizontal; - double blockSizeVertical; - double _safeAreaHorizontal; - double _safeAreaVertical; - double safeBlockHorizontal; - double safeBlockVertical; - double profileDrawerWidth; - double refHeight; - double refWidth; - - void init(BuildContext context) { - _mediaQueryData = MediaQuery.of(context); - screenWidth = _mediaQueryData.size.width; - screenHeight = _mediaQueryData.size.height; - refHeight = 1450; - refWidth = 670; - - if (screenHeight < 1200) { - blockSizeHorizontal = screenWidth / 100; - blockSizeVertical = screenHeight / 100; - - _safeAreaHorizontal = - _mediaQueryData.padding.left + _mediaQueryData.padding.right; - _safeAreaVertical = - _mediaQueryData.padding.top + _mediaQueryData.padding.bottom; - safeBlockHorizontal = (screenWidth - _safeAreaHorizontal) / 100; - safeBlockVertical = (screenHeight - _safeAreaVertical) / 100; - } else { - blockSizeHorizontal = screenWidth / 120; - blockSizeVertical = screenHeight / 120; - - _safeAreaHorizontal = - _mediaQueryData.padding.left + _mediaQueryData.padding.right; - _safeAreaVertical = - _mediaQueryData.padding.top + _mediaQueryData.padding.bottom; - safeBlockHorizontal = (screenWidth - _safeAreaHorizontal) / 120; - safeBlockVertical = (screenHeight - _safeAreaVertical) / 120; - } - } - - double getWidthRatio(double val) { - double res = (val / refWidth) * 100; - double temp = res * blockSizeHorizontal; - - return temp; - } - - double getHeightRatio(double val) { - double res = (val / refHeight) * 100; - double temp = res * blockSizeVertical; - return temp; - } - - double getFontRatio(double val) { - double res = (val / refWidth) * 100; - double temp = 0.0; - if (screenWidth < screenHeight) { - temp = res * safeBlockHorizontal; - } else { - temp = res * safeBlockVertical; - } - - return temp; - } -} - -extension SizeUtils on num { - double get toWidth => SizeConfig().getWidthRatio(this.toDouble()); - double get toHeight => SizeConfig().getHeightRatio(this.toDouble()); - double get toFont => SizeConfig().getFontRatio(this.toDouble()); -} diff --git a/examples/book-store-firebase/app/lib/src/utils/validators.dart b/examples/book-store-firebase/app/lib/src/utils/validators.dart deleted file mode 100644 index f6b93174..00000000 --- a/examples/book-store-firebase/app/lib/src/utils/validators.dart +++ /dev/null @@ -1,17 +0,0 @@ -class Validations { - //Validate email id - static String isEmail(String value) { - if (value.isEmpty) return 'Email cannot be Empty'; - final RegExp emailExp = new RegExp( - r'^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$'); - if (!emailExp.hasMatch(value)) return 'Please check entered email'; - return null; - } - - //Validate password - static String checkPassword(String value) { - if (value.isEmpty) return 'Password cannot be Empty'; - if (value.length < 6) return 'Password must be 6 or more characters'; - return null; - } -} diff --git a/examples/book-store-firebase/app/linux/CMakeLists.txt b/examples/book-store-firebase/app/linux/CMakeLists.txt deleted file mode 100644 index 5c553c66..00000000 --- a/examples/book-store-firebase/app/linux/CMakeLists.txt +++ /dev/null @@ -1,116 +0,0 @@ -cmake_minimum_required(VERSION 3.10) -project(runner LANGUAGES CXX) - -set(BINARY_NAME "app") -set(APPLICATION_ID "com.example.app") - -cmake_policy(SET CMP0063 NEW) - -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() - -# Configure build 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. -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() - -set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") - -# Flutter library and tool build rules. -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}") - -# Application build -add_executable(${BINARY_NAME} - "main.cc" - "my_application.cc" - "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" -) -apply_standard_settings(${BINARY_NAME}) -target_link_libraries(${BINARY_NAME} PRIVATE flutter) -target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) -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) - -if(PLUGIN_BUNDLED_LIBRARIES) - install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) -endif() - -# 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/examples/book-store-firebase/app/linux/flutter/CMakeLists.txt b/examples/book-store-firebase/app/linux/flutter/CMakeLists.txt deleted file mode 100644 index 33fd5801..00000000 --- a/examples/book-store-firebase/app/linux/flutter/CMakeLists.txt +++ /dev/null @@ -1,87 +0,0 @@ -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/examples/book-store-firebase/app/macos/Flutter/Flutter-Debug.xcconfig b/examples/book-store-firebase/app/macos/Flutter/Flutter-Debug.xcconfig deleted file mode 100644 index c2efd0b6..00000000 --- a/examples/book-store-firebase/app/macos/Flutter/Flutter-Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/examples/book-store-firebase/app/macos/Flutter/Flutter-Release.xcconfig b/examples/book-store-firebase/app/macos/Flutter/Flutter-Release.xcconfig deleted file mode 100644 index c2efd0b6..00000000 --- a/examples/book-store-firebase/app/macos/Flutter/Flutter-Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/examples/book-store-firebase/app/macos/Flutter/GeneratedPluginRegistrant.swift b/examples/book-store-firebase/app/macos/Flutter/GeneratedPluginRegistrant.swift deleted file mode 100644 index c7f5d57f..00000000 --- a/examples/book-store-firebase/app/macos/Flutter/GeneratedPluginRegistrant.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// Generated file. Do not edit. -// - -import FlutterMacOS -import Foundation - -import cloud_firestore -import connectivity_plus_macos -import firebase_auth -import firebase_core -import path_provider_macos -import sqflite - -func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { - FLTFirebaseFirestorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseFirestorePlugin")) - ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin")) - FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin")) - FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) - PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) - SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) -} diff --git a/examples/book-store-firebase/app/macos/Runner.xcodeproj/project.pbxproj b/examples/book-store-firebase/app/macos/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index 87088f13..00000000 --- a/examples/book-store-firebase/app/macos/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,572 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 51; - 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 */ - 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 */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 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 */ - 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 /* app.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "app.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 = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 33CC10EA2044A3C60003C045 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 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 */, - 33CC10EE2044A3C60003C045 /* Products */, - D73912EC22F37F3D000D13A0 /* Frameworks */, - ); - sourceTree = ""; - }; - 33CC10EE2044A3C60003C045 /* Products */ = { - isa = PBXGroup; - children = ( - 33CC10ED2044A3C60003C045 /* app.app */, - ); - 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 = ""; - }; - D73912EC22F37F3D000D13A0 /* Frameworks */ = { - isa = PBXGroup; - children = ( - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 33CC10EC2044A3C60003C045 /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 33CC10E92044A3C60003C045 /* Sources */, - 33CC10EA2044A3C60003C045 /* Frameworks */, - 33CC10EB2044A3C60003C045 /* Resources */, - 33CC110E2044A8840003C045 /* Bundle Framework */, - 3399D490228B24CF009A79C7 /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - 33CC11202044C79F0003C045 /* PBXTargetDependency */, - ); - name = Runner; - productName = Runner; - productReference = 33CC10ED2044A3C60003C045 /* app.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 33CC10E52044A3C60003C045 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1300; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 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 */, - 33CC111A2044C6BA0003C045 /* Flutter Assemble */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 33CC10EB2044A3C60003C045 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, - 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3399D490228B24CF009A79C7 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - 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"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 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 */ - 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 */ - 338D0CE9231458BD00FA5F75 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - 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; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - 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.11; - 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", - ); - 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; - 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; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - 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.11; - 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; - 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; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - 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.11; - 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", - ); - 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", - ); - 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 */ - 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/examples/book-store-firebase/app/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/book-store-firebase/app/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/examples/book-store-firebase/app/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/book-store-firebase/app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/examples/book-store-firebase/app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index 2aba2321..00000000 --- a/examples/book-store-firebase/app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/book-store-firebase/app/macos/Runner.xcworkspace/contents.xcworkspacedata b/examples/book-store-firebase/app/macos/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16..00000000 --- a/examples/book-store-firebase/app/macos/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/examples/book-store-firebase/app/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/book-store-firebase/app/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/examples/book-store-firebase/app/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/book-store-firebase/app/pubspec.lock b/examples/book-store-firebase/app/pubspec.lock deleted file mode 100644 index 46516f38..00000000 --- a/examples/book-store-firebase/app/pubspec.lock +++ /dev/null @@ -1,747 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - api_sdk: - dependency: transitive - description: - path: "../api_sdk" - relative: true - source: path - version: "1.0.0+1" - archive: - dependency: transitive - description: - name: archive - url: "https://pub.dartlang.org" - source: hosted - version: "3.2.2" - args: - dependency: transitive - description: - name: args - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.0" - async: - dependency: transitive - description: - name: async - url: "https://pub.dartlang.org" - source: hosted - version: "2.8.2" - bloc: - dependency: "direct main" - description: - name: bloc - url: "https://pub.dartlang.org" - source: hosted - version: "8.0.3" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - cached_network_image: - dependency: "direct main" - description: - name: cached_network_image - url: "https://pub.dartlang.org" - source: hosted - version: "3.2.0" - cached_network_image_platform_interface: - dependency: transitive - description: - name: cached_network_image_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - cached_network_image_web: - dependency: transitive - description: - name: cached_network_image_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - characters: - dependency: transitive - description: - name: characters - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - clock: - dependency: transitive - description: - name: clock - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - cloud_firestore: - dependency: "direct main" - description: - name: cloud_firestore - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.10" - cloud_firestore_platform_interface: - dependency: transitive - description: - name: cloud_firestore_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "5.5.1" - cloud_firestore_web: - dependency: transitive - description: - name: cloud_firestore_web - url: "https://pub.dartlang.org" - source: hosted - version: "2.6.10" - collection: - dependency: transitive - description: - name: collection - url: "https://pub.dartlang.org" - source: hosted - version: "1.15.0" - connectivity_plus: - dependency: transitive - description: - name: connectivity_plus - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.1" - connectivity_plus_linux: - dependency: transitive - description: - name: connectivity_plus_linux - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - connectivity_plus_macos: - dependency: transitive - description: - name: connectivity_plus_macos - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.1" - connectivity_plus_platform_interface: - dependency: transitive - description: - name: connectivity_plus_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_web: - dependency: transitive - description: - name: connectivity_plus_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_windows: - dependency: transitive - description: - name: connectivity_plus_windows - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - crypto: - dependency: transitive - description: - name: crypto - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.4" - dbus: - dependency: transitive - description: - name: dbus - url: "https://pub.dartlang.org" - source: hosted - version: "0.7.1" - equatable: - dependency: "direct main" - description: - name: equatable - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - fake_async: - dependency: transitive - description: - name: fake_async - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - ffi: - dependency: transitive - description: - name: ffi - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.2" - file: - dependency: transitive - description: - name: file - url: "https://pub.dartlang.org" - source: hosted - version: "6.1.2" - firebase_auth: - dependency: transitive - description: - name: firebase_auth - url: "https://pub.dartlang.org" - source: hosted - version: "3.3.11" - firebase_auth_platform_interface: - dependency: transitive - description: - name: firebase_auth_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "6.2.1" - firebase_auth_web: - dependency: transitive - description: - name: firebase_auth_web - url: "https://pub.dartlang.org" - source: hosted - version: "3.3.9" - firebase_core: - dependency: "direct main" - description: - name: firebase_core - url: "https://pub.dartlang.org" - source: hosted - version: "1.13.1" - firebase_core_platform_interface: - dependency: transitive - description: - name: firebase_core_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "4.2.5" - firebase_core_web: - dependency: transitive - description: - name: firebase_core_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.6.1" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_bloc: - dependency: "direct main" - description: - name: flutter_bloc - url: "https://pub.dartlang.org" - source: hosted - version: "8.0.1" - flutter_blurhash: - dependency: transitive - description: - name: flutter_blurhash - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.4" - flutter_cache_manager: - dependency: transitive - description: - name: flutter_cache_manager - url: "https://pub.dartlang.org" - source: hosted - version: "3.3.0" - flutter_native_splash: - dependency: "direct dev" - description: - name: flutter_native_splash - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - fluttertoast: - dependency: "direct main" - description: - name: fluttertoast - url: "https://pub.dartlang.org" - source: hosted - version: "8.0.9" - freezed_annotation: - dependency: transitive - description: - name: freezed_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - get_it: - dependency: "direct main" - description: - name: get_it - url: "https://pub.dartlang.org" - source: hosted - version: "7.2.0" - gql: - dependency: transitive - description: - name: gql - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.0" - gql_dedupe_link: - dependency: transitive - description: - name: gql_dedupe_link - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - gql_error_link: - dependency: transitive - description: - name: gql_error_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - gql_exec: - dependency: transitive - description: - name: gql_exec - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.0" - gql_http_link: - dependency: transitive - description: - name: gql_http_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.0" - gql_link: - dependency: transitive - description: - name: gql_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.0" - gql_transform_link: - dependency: transitive - description: - name: gql_transform_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - graphql: - dependency: transitive - description: - name: graphql - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.1" - graphql_flutter: - dependency: transitive - description: - name: graphql_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.1" - hive: - dependency: transitive - description: - name: hive - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - http: - dependency: transitive - description: - name: http - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.4" - http_parser: - dependency: transitive - description: - name: http_parser - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.0" - image: - dependency: transitive - description: - name: image - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.3" - intl: - dependency: transitive - description: - name: intl - url: "https://pub.dartlang.org" - source: hosted - version: "0.17.0" - js: - dependency: transitive - description: - name: js - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.3" - json_annotation: - dependency: transitive - description: - name: json_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "4.4.0" - matcher: - dependency: transitive - description: - name: matcher - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.11" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.3" - meta: - dependency: "direct main" - description: - name: meta - url: "https://pub.dartlang.org" - source: hosted - version: "1.7.0" - nested: - dependency: transitive - description: - name: nested - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - nm: - dependency: transitive - description: - name: nm - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.0" - normalize: - dependency: transitive - description: - name: normalize - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.0+1" - octo_image: - dependency: transitive - description: - name: octo_image - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - path: - dependency: transitive - description: - name: path - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0" - path_provider: - dependency: transitive - description: - name: path_provider - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.9" - path_provider_android: - dependency: transitive - description: - name: path_provider_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.12" - path_provider_ios: - dependency: transitive - description: - name: path_provider_ios - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.8" - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.5" - path_provider_macos: - dependency: transitive - description: - name: path_provider_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.dartlang.org" - source: hosted - version: "1.11.1" - petitparser: - dependency: transitive - description: - name: petitparser - url: "https://pub.dartlang.org" - source: hosted - version: "4.4.0" - platform: - dependency: transitive - description: - name: platform - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.2" - process: - dependency: transitive - description: - name: process - url: "https://pub.dartlang.org" - source: hosted - version: "4.2.4" - provider: - dependency: "direct main" - description: - name: provider - url: "https://pub.dartlang.org" - source: hosted - version: "6.0.2" - rxdart: - dependency: transitive - description: - name: rxdart - url: "https://pub.dartlang.org" - source: hosted - version: "0.27.3" - shared: - dependency: "direct main" - description: - path: "../shared" - relative: true - source: path - version: "1.0.0+1" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_span: - dependency: transitive - description: - name: source_span - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.1" - sqflite: - dependency: transitive - description: - name: sqflite - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.2" - sqflite_common: - dependency: transitive - description: - name: sqflite_common - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.1" - stack_trace: - dependency: transitive - description: - name: stack_trace - url: "https://pub.dartlang.org" - source: hosted - version: "1.10.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - synchronized: - dependency: transitive - description: - name: synchronized - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - test_api: - dependency: transitive - description: - name: test_api - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.8" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - universal_io: - dependency: transitive - description: - name: universal_io - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.4" - uuid: - dependency: transitive - description: - name: uuid - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.6" - vector_math: - dependency: transitive - description: - name: vector_math - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - webview_flutter: - dependency: "direct main" - description: - name: webview_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - webview_flutter_android: - dependency: transitive - description: - name: webview_flutter_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.8.3" - webview_flutter_platform_interface: - dependency: transitive - description: - name: webview_flutter_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.1" - webview_flutter_wkwebview: - dependency: transitive - description: - name: webview_flutter_wkwebview - url: "https://pub.dartlang.org" - source: hosted - version: "2.7.1" - win32: - dependency: transitive - description: - name: win32 - url: "https://pub.dartlang.org" - source: hosted - version: "2.4.2" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0+1" - xml: - dependency: transitive - description: - name: xml - url: "https://pub.dartlang.org" - source: hosted - version: "5.3.1" - yaml: - dependency: transitive - description: - name: yaml - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" -sdks: - dart: ">=2.16.0 <3.0.0" - flutter: ">=2.8.0" diff --git a/examples/book-store-firebase/app/web/favicon.png b/examples/book-store-firebase/app/web/favicon.png deleted file mode 100644 index 8aaa46ac..00000000 Binary files a/examples/book-store-firebase/app/web/favicon.png and /dev/null differ diff --git a/examples/book-store-firebase/app/web/icons/Icon-192.png b/examples/book-store-firebase/app/web/icons/Icon-192.png deleted file mode 100644 index b749bfef..00000000 Binary files a/examples/book-store-firebase/app/web/icons/Icon-192.png and /dev/null differ diff --git a/examples/book-store-firebase/app/web/icons/Icon-512.png b/examples/book-store-firebase/app/web/icons/Icon-512.png deleted file mode 100644 index 88cfd48d..00000000 Binary files a/examples/book-store-firebase/app/web/icons/Icon-512.png and /dev/null differ diff --git a/examples/book-store-firebase/app/web/icons/Icon-maskable-192.png b/examples/book-store-firebase/app/web/icons/Icon-maskable-192.png deleted file mode 100644 index eb9b4d76..00000000 Binary files a/examples/book-store-firebase/app/web/icons/Icon-maskable-192.png and /dev/null differ diff --git a/examples/book-store-firebase/app/web/icons/Icon-maskable-512.png b/examples/book-store-firebase/app/web/icons/Icon-maskable-512.png deleted file mode 100644 index d69c5669..00000000 Binary files a/examples/book-store-firebase/app/web/icons/Icon-maskable-512.png and /dev/null differ diff --git a/examples/book-store-firebase/app/web/index.html b/examples/book-store-firebase/app/web/index.html deleted file mode 100644 index 9a16f36c..00000000 --- a/examples/book-store-firebase/app/web/index.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - app - - - - - - - diff --git a/examples/book-store-firebase/app/web/manifest.json b/examples/book-store-firebase/app/web/manifest.json deleted file mode 100644 index 5620a335..00000000 --- a/examples/book-store-firebase/app/web/manifest.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "app", - "short_name": "app", - "start_url": ".", - "display": "standalone", - "background_color": "#0175C2", - "theme_color": "#0175C2", - "description": "A new Flutter project.", - "orientation": "portrait-primary", - "prefer_related_applications": false, - "icons": [ - { - "src": "icons/Icon-192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "icons/Icon-512.png", - "sizes": "512x512", - "type": "image/png" - }, - { - "src": "icons/Icon-maskable-192.png", - "sizes": "192x192", - "type": "image/png", - "purpose": "maskable" - }, - { - "src": "icons/Icon-maskable-512.png", - "sizes": "512x512", - "type": "image/png", - "purpose": "maskable" - } - ] -} diff --git a/examples/book-store-firebase/app/windows/CMakeLists.txt b/examples/book-store-firebase/app/windows/CMakeLists.txt deleted file mode 100644 index 9ba329fa..00000000 --- a/examples/book-store-firebase/app/windows/CMakeLists.txt +++ /dev/null @@ -1,95 +0,0 @@ -cmake_minimum_required(VERSION 3.14) -project(app LANGUAGES CXX) - -set(BINARY_NAME "app") - -cmake_policy(SET CMP0063 NEW) - -set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") - -# Configure build options. -get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) -if(IS_MULTICONFIG) - set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" - CACHE STRING "" FORCE) -else() - 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() -endif() - -set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") -set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") -set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") -set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") - -# Use Unicode for all projects. -add_definitions(-DUNICODE -D_UNICODE) - -# Compilation settings that should be applied to most targets. -function(APPLY_STANDARD_SETTINGS TARGET) - target_compile_features(${TARGET} PUBLIC cxx_std_17) - target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") - target_compile_options(${TARGET} PRIVATE /EHsc) - target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") - target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") -endfunction() - -set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") - -# Flutter library and tool build rules. -add_subdirectory(${FLUTTER_MANAGED_DIR}) - -# Application build -add_subdirectory("runner") - -# Generated plugin build rules, which manage building the plugins and adding -# them to the application. -include(flutter/generated_plugins.cmake) - - -# === Installation === -# Support files are copied into place next to the executable, so that it can -# run in place. This is done instead of making a separate bundle (as on Linux) -# so that building and running from within Visual Studio will work. -set(BUILD_BUNDLE_DIR "$") -# Make the "install" step default, as it's required to run. -set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) -if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) -endif() - -set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") -set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") - -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) - -if(PLUGIN_BUNDLED_LIBRARIES) - install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) -endif() - -# 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. -install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" - CONFIGURATIONS Profile;Release - COMPONENT Runtime) diff --git a/examples/book-store-firebase/app/windows/flutter/CMakeLists.txt b/examples/book-store-firebase/app/windows/flutter/CMakeLists.txt deleted file mode 100644 index b2e4bd8d..00000000 --- a/examples/book-store-firebase/app/windows/flutter/CMakeLists.txt +++ /dev/null @@ -1,103 +0,0 @@ -cmake_minimum_required(VERSION 3.14) - -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. -set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") - -# === Flutter Library === -set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") - -# 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/windows/app.so" PARENT_SCOPE) - -list(APPEND FLUTTER_LIBRARY_HEADERS - "flutter_export.h" - "flutter_windows.h" - "flutter_messenger.h" - "flutter_plugin_registrar.h" - "flutter_texture_registrar.h" -) -list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") -add_library(flutter INTERFACE) -target_include_directories(flutter INTERFACE - "${EPHEMERAL_DIR}" -) -target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") -add_dependencies(flutter flutter_assemble) - -# === Wrapper === -list(APPEND CPP_WRAPPER_SOURCES_CORE - "core_implementations.cc" - "standard_codec.cc" -) -list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") -list(APPEND CPP_WRAPPER_SOURCES_PLUGIN - "plugin_registrar.cc" -) -list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") -list(APPEND CPP_WRAPPER_SOURCES_APP - "flutter_engine.cc" - "flutter_view_controller.cc" -) -list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") - -# Wrapper sources needed for a plugin. -add_library(flutter_wrapper_plugin STATIC - ${CPP_WRAPPER_SOURCES_CORE} - ${CPP_WRAPPER_SOURCES_PLUGIN} -) -apply_standard_settings(flutter_wrapper_plugin) -set_target_properties(flutter_wrapper_plugin PROPERTIES - POSITION_INDEPENDENT_CODE ON) -set_target_properties(flutter_wrapper_plugin PROPERTIES - CXX_VISIBILITY_PRESET hidden) -target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) -target_include_directories(flutter_wrapper_plugin PUBLIC - "${WRAPPER_ROOT}/include" -) -add_dependencies(flutter_wrapper_plugin flutter_assemble) - -# Wrapper sources needed for the runner. -add_library(flutter_wrapper_app STATIC - ${CPP_WRAPPER_SOURCES_CORE} - ${CPP_WRAPPER_SOURCES_APP} -) -apply_standard_settings(flutter_wrapper_app) -target_link_libraries(flutter_wrapper_app PUBLIC flutter) -target_include_directories(flutter_wrapper_app PUBLIC - "${WRAPPER_ROOT}/include" -) -add_dependencies(flutter_wrapper_app 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. -set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") -set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) -add_custom_command( - OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} - ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} - ${CPP_WRAPPER_SOURCES_APP} - ${PHONY_OUTPUT} - COMMAND ${CMAKE_COMMAND} -E env - ${FLUTTER_TOOL_ENVIRONMENT} - "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" - windows-x64 $ - VERBATIM -) -add_custom_target(flutter_assemble DEPENDS - "${FLUTTER_LIBRARY}" - ${FLUTTER_LIBRARY_HEADERS} - ${CPP_WRAPPER_SOURCES_CORE} - ${CPP_WRAPPER_SOURCES_PLUGIN} - ${CPP_WRAPPER_SOURCES_APP} -) diff --git a/examples/book-store-firebase/app/windows/flutter/generated_plugin_registrant.cc b/examples/book-store-firebase/app/windows/flutter/generated_plugin_registrant.cc deleted file mode 100644 index 8083d749..00000000 --- a/examples/book-store-firebase/app/windows/flutter/generated_plugin_registrant.cc +++ /dev/null @@ -1,14 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#include "generated_plugin_registrant.h" - -#include - -void RegisterPlugins(flutter::PluginRegistry* registry) { - ConnectivityPlusWindowsPluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin")); -} diff --git a/examples/book-store-firebase/app/windows/flutter/generated_plugins.cmake b/examples/book-store-firebase/app/windows/flutter/generated_plugins.cmake deleted file mode 100644 index ba4a2175..00000000 --- a/examples/book-store-firebase/app/windows/flutter/generated_plugins.cmake +++ /dev/null @@ -1,16 +0,0 @@ -# -# Generated file, do not edit. -# - -list(APPEND FLUTTER_PLUGIN_LIST - connectivity_plus_windows -) - -set(PLUGIN_BUNDLED_LIBRARIES) - -foreach(plugin ${FLUTTER_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows 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) diff --git a/examples/book-store-firebase/app/windows/runner/CMakeLists.txt b/examples/book-store-firebase/app/windows/runner/CMakeLists.txt deleted file mode 100644 index de2d8916..00000000 --- a/examples/book-store-firebase/app/windows/runner/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -cmake_minimum_required(VERSION 3.14) -project(runner LANGUAGES CXX) - -add_executable(${BINARY_NAME} WIN32 - "flutter_window.cpp" - "main.cpp" - "utils.cpp" - "win32_window.cpp" - "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" - "Runner.rc" - "runner.exe.manifest" -) -apply_standard_settings(${BINARY_NAME}) -target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") -target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) -target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") -add_dependencies(${BINARY_NAME} flutter_assemble) diff --git a/examples/book-store-firebase/app/windows/runner/Runner.rc b/examples/book-store-firebase/app/windows/runner/Runner.rc deleted file mode 100644 index 645c9828..00000000 --- a/examples/book-store-firebase/app/windows/runner/Runner.rc +++ /dev/null @@ -1,121 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#pragma code_page(65001) -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "winres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (United States) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""winres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_APP_ICON ICON "resources\\app_icon.ico" - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -#ifdef FLUTTER_BUILD_NUMBER -#define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER -#else -#define VERSION_AS_NUMBER 1,0,0 -#endif - -#ifdef FLUTTER_BUILD_NAME -#define VERSION_AS_STRING #FLUTTER_BUILD_NAME -#else -#define VERSION_AS_STRING "1.0.0" -#endif - -VS_VERSION_INFO VERSIONINFO - FILEVERSION VERSION_AS_NUMBER - PRODUCTVERSION VERSION_AS_NUMBER - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#ifdef _DEBUG - FILEFLAGS VS_FF_DEBUG -#else - FILEFLAGS 0x0L -#endif - FILEOS VOS__WINDOWS32 - FILETYPE VFT_APP - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904e4" - BEGIN - VALUE "CompanyName", "com.example" "\0" - VALUE "FileDescription", "app" "\0" - VALUE "FileVersion", VERSION_AS_STRING "\0" - VALUE "InternalName", "app" "\0" - VALUE "LegalCopyright", "Copyright (C) 2022 com.example. All rights reserved." "\0" - VALUE "OriginalFilename", "app.exe" "\0" - VALUE "ProductName", "app" "\0" - VALUE "ProductVersion", VERSION_AS_STRING "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1252 - END -END - -#endif // English (United States) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED diff --git a/examples/book-store-firebase/app/windows/runner/main.cpp b/examples/book-store-firebase/app/windows/runner/main.cpp deleted file mode 100644 index 4d470b48..00000000 --- a/examples/book-store-firebase/app/windows/runner/main.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include -#include -#include - -#include "flutter_window.h" -#include "utils.h" - -int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, - _In_ wchar_t *command_line, _In_ int show_command) { - // Attach to console when present (e.g., 'flutter run') or create a - // new console when running with a debugger. - if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { - CreateAndAttachConsole(); - } - - // Initialize COM, so that it is available for use in the library and/or - // plugins. - ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); - - flutter::DartProject project(L"data"); - - std::vector command_line_arguments = - GetCommandLineArguments(); - - project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); - - FlutterWindow window(project); - Win32Window::Point origin(10, 10); - Win32Window::Size size(1280, 720); - if (!window.CreateAndShow(L"app", origin, size)) { - return EXIT_FAILURE; - } - window.SetQuitOnClose(true); - - ::MSG msg; - while (::GetMessage(&msg, nullptr, 0, 0)) { - ::TranslateMessage(&msg); - ::DispatchMessage(&msg); - } - - ::CoUninitialize(); - return EXIT_SUCCESS; -} diff --git a/examples/book-store-firebase/app/windows/runner/utils.cpp b/examples/book-store-firebase/app/windows/runner/utils.cpp deleted file mode 100644 index d19bdbbc..00000000 --- a/examples/book-store-firebase/app/windows/runner/utils.cpp +++ /dev/null @@ -1,64 +0,0 @@ -#include "utils.h" - -#include -#include -#include -#include - -#include - -void CreateAndAttachConsole() { - if (::AllocConsole()) { - FILE *unused; - if (freopen_s(&unused, "CONOUT$", "w", stdout)) { - _dup2(_fileno(stdout), 1); - } - if (freopen_s(&unused, "CONOUT$", "w", stderr)) { - _dup2(_fileno(stdout), 2); - } - std::ios::sync_with_stdio(); - FlutterDesktopResyncOutputStreams(); - } -} - -std::vector GetCommandLineArguments() { - // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. - int argc; - wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); - if (argv == nullptr) { - return std::vector(); - } - - std::vector command_line_arguments; - - // Skip the first argument as it's the binary name. - for (int i = 1; i < argc; i++) { - command_line_arguments.push_back(Utf8FromUtf16(argv[i])); - } - - ::LocalFree(argv); - - return command_line_arguments; -} - -std::string Utf8FromUtf16(const wchar_t* utf16_string) { - if (utf16_string == nullptr) { - return std::string(); - } - int target_length = ::WideCharToMultiByte( - CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, - -1, nullptr, 0, nullptr, nullptr); - if (target_length == 0) { - return std::string(); - } - std::string utf8_string; - utf8_string.resize(target_length); - int converted_length = ::WideCharToMultiByte( - CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, - -1, utf8_string.data(), - target_length, nullptr, nullptr); - if (converted_length == 0) { - return std::string(); - } - return utf8_string; -} diff --git a/examples/book-store-firebase/book_store.gif b/examples/book-store-firebase/book_store.gif deleted file mode 100644 index 81031b4d..00000000 Binary files a/examples/book-store-firebase/book_store.gif and /dev/null differ diff --git a/examples/book-store-firebase/clean_project.sh b/examples/book-store-firebase/clean_project.sh deleted file mode 100644 index d900326a..00000000 --- a/examples/book-store-firebase/clean_project.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -cd api_sdk -echo "+++++API SDK pub clean+++++" -flutter clean -echo "+++++API SDK done+++++" - - -cd ../shared -echo "+++++Shared pub clean+++++" -flutter clean -echo "+++++Shared done+++++" - -cd ../app -echo "+++++Main app pub clean+++++" -flutter clean -echo "+++++Cleaning done+++++" \ No newline at end of file diff --git a/examples/book-store-firebase/run_script.sh b/examples/book-store-firebase/run_script.sh deleted file mode 100644 index 9f269a83..00000000 --- a/examples/book-store-firebase/run_script.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -cd api_sdk -echo "+++++API SDK pub clean+++++" -flutter clean -echo "+++++API SDK pub get+++++" -flutter pub get -echo "+++++API SDK done+++++" - - -cd ../shared -echo "+++++Shared pub clean+++++" -flutter clean -echo "+++++Shared pub get+++++" -flutter pub get -echo "+++++Shared done+++++" - -cd ../app -echo "+++++Main app pub clean+++++" -flutter clean -echo "+++++Main app pub get+++++" -flutter pub get -echo "+++++Main app run+++++" -flutter run \ No newline at end of file diff --git a/examples/book-store-firebase/shared/.gitignore b/examples/book-store-firebase/shared/.gitignore deleted file mode 100644 index 9d532b18..00000000 --- a/examples/book-store-firebase/shared/.gitignore +++ /dev/null @@ -1,41 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json diff --git a/examples/book-store-firebase/shared/.metadata b/examples/book-store-firebase/shared/.metadata deleted file mode 100644 index 107fcb7b..00000000 --- a/examples/book-store-firebase/shared/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 8874f21e79d7ec66d0457c7ab338348e31b17f1d - channel: stable - -project_type: app diff --git a/examples/book-store-firebase/shared/README.md b/examples/book-store-firebase/shared/README.md deleted file mode 100644 index 25946365..00000000 --- a/examples/book-store-firebase/shared/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# shared - -A new Flutter project. - -## Getting Started - -This project is a starting point for a Flutter application. - -A few resources to get you started if this is your first Flutter project: - -- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) - -For help getting started with Flutter, view our -[online documentation](https://flutter.dev/docs), which offers tutorials, -samples, guidance on mobile development, and a full API reference. diff --git a/examples/book-store-firebase/shared/lib/main.dart b/examples/book-store-firebase/shared/lib/main.dart deleted file mode 100644 index 1e3ed0de..00000000 --- a/examples/book-store-firebase/shared/lib/main.dart +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:api_sdk/firebase_method/api_handles/firebase_api.dart'; -import 'package:get_it/get_it.dart'; - -import 'modules/bookstore/resources/firebase_crud_operations.dart'; - -export 'package:shared/modules/authentication/auth.dart'; -export 'package:shared/modules/authentication/bloc/bloc_controller.dart'; -export 'package:shared/modules/bookstore/models/book_store_model.dart'; - -export 'modules/bookstore/resources/firebase_crud_operations.dart'; - -GetIt locator = GetIt.asNewInstance(); - -void setupLocator() { - locator.registerLazySingleton(() => FirebaseApi('bookstore')); - locator.registerLazySingleton(() => FirebaseCRUDoperations()); -} diff --git a/examples/book-store-firebase/shared/lib/modules/authentication/auth.dart b/examples/book-store-firebase/shared/lib/modules/authentication/auth.dart deleted file mode 100644 index bc2ab3ab..00000000 --- a/examples/book-store-firebase/shared/lib/modules/authentication/auth.dart +++ /dev/null @@ -1,2 +0,0 @@ -export 'package:shared/modules/authentication/bloc/authentication/authentication_bloc_public.dart'; -export 'package:shared/modules/authentication/resources/authentication_repository.dart'; diff --git a/examples/book-store-firebase/shared/lib/modules/authentication/bloc/authentication/authentication_bloc.dart b/examples/book-store-firebase/shared/lib/modules/authentication/bloc/authentication/authentication_bloc.dart deleted file mode 100644 index 2a6e271a..00000000 --- a/examples/book-store-firebase/shared/lib/modules/authentication/bloc/authentication/authentication_bloc.dart +++ /dev/null @@ -1,85 +0,0 @@ -import 'package:bloc/bloc.dart'; -import 'package:shared/main.dart'; -import 'package:shared/modules/authentication/resources/authentication_repository.dart'; -import 'authentication_bloc_public.dart'; - -class AuthenticationBloc - extends Bloc { - AuthenticationBloc() : super(AuthenticationInitial()); - final AuthenticationRepository authenticationService = - AuthenticationRepository(); - @override - Stream mapEventToState( - AuthenticationEvent event) async* { - if (event is AppLoadedup) { - yield* _mapAppSignUpLoadedState(event); - } - - if (event is UserSignUp) { - yield* _mapUserSignupToState(event); - } - - if (event is UserLogin) { - yield* _mapUserLoginState(event); - } - if (event is UserLogOut) { - authenticationService.logout(); - yield UserLogoutState(); - } - if (event is GetUserData) { - final firebaseUser = await authenticationService.getUserData(); - if (firebaseUser != null) - yield SetUserData( - email: firebaseUser.email, avatar: firebaseUser.avatar); - else - yield AuthenticationStart(); - } - } - - Stream _mapAppSignUpLoadedState( - AppLoadedup event) async* { - yield AuthenticationLoading(); - try { - await Future.delayed(Duration(milliseconds: 500)); // a simulated delay - final firebaseUser = await authenticationService.getUserData(); - if (firebaseUser != null) { - yield AppAutheticated(); - } else { - yield AuthenticationStart(); - } - } catch (e) { - yield AuthenticationFailure( - message: e.message ?? 'An unknown error occurred'); - } - } - - Stream _mapUserSignupToState(UserSignUp event) async* { - yield AuthenticationLoading(); - try { - await Future.delayed(Duration(milliseconds: 500)); // a simulated delay - final firebaseUser = await authenticationService - .signUpWithEmailAndPassword(event.email, event.password); - if (firebaseUser != null) { - yield AppAutheticated(); - } - } catch (e) { - yield AuthenticationFailure( - message: e.toString() ?? 'An unknown error occurred'); - } - } - - Stream _mapUserLoginState(UserLogin event) async* { - yield AuthenticationLoading(); - try { - await Future.delayed(Duration(milliseconds: 500)); // a simulated delay - final firebaseUser = await authenticationService - .loginWithEmailAndPassword(event.email, event.password); - if (firebaseUser != null) { - yield AppAutheticated(); - } - } catch (e) { - yield AuthenticationFailure( - message: e.toString() ?? 'An unknown error occurred'); - } - } -} diff --git a/examples/book-store-firebase/shared/lib/modules/authentication/bloc/authentication/authentication_bloc_public.dart b/examples/book-store-firebase/shared/lib/modules/authentication/bloc/authentication/authentication_bloc_public.dart deleted file mode 100644 index 4ebb9f73..00000000 --- a/examples/book-store-firebase/shared/lib/modules/authentication/bloc/authentication/authentication_bloc_public.dart +++ /dev/null @@ -1,3 +0,0 @@ -export 'package:shared/modules/authentication/bloc/authentication/authentication_bloc.dart'; -export 'package:shared/modules/authentication/bloc/authentication/authentication_event.dart'; -export 'package:shared/modules/authentication/bloc/authentication/authentication_state.dart'; diff --git a/examples/book-store-firebase/shared/lib/modules/authentication/bloc/authentication/authentication_event.dart b/examples/book-store-firebase/shared/lib/modules/authentication/bloc/authentication/authentication_event.dart deleted file mode 100644 index d6f7a93f..00000000 --- a/examples/book-store-firebase/shared/lib/modules/authentication/bloc/authentication/authentication_event.dart +++ /dev/null @@ -1,34 +0,0 @@ -import 'package:meta/meta.dart'; -import 'package:equatable/equatable.dart'; - -abstract class AuthenticationEvent extends Equatable { - const AuthenticationEvent(); - - @override - List get props => []; -} - -// Fired just after the app is launched -class AppLoadedup extends AuthenticationEvent {} - -class UserLogOut extends AuthenticationEvent {} - -class GetUserData extends AuthenticationEvent {} - -class UserSignUp extends AuthenticationEvent { - final String email; - final String password; - UserSignUp({@required this.email, this.password}); - - @override - List get props => [email, password]; -} - -class UserLogin extends AuthenticationEvent { - final String email; - final String password; - UserLogin({@required this.email, this.password}); - - @override - List get props => [email, password]; -} diff --git a/examples/book-store-firebase/shared/lib/modules/authentication/bloc/authentication/authentication_state.dart b/examples/book-store-firebase/shared/lib/modules/authentication/bloc/authentication/authentication_state.dart deleted file mode 100644 index 20f48daa..00000000 --- a/examples/book-store-firebase/shared/lib/modules/authentication/bloc/authentication/authentication_state.dart +++ /dev/null @@ -1,44 +0,0 @@ -import 'package:meta/meta.dart'; -import 'package:equatable/equatable.dart'; - -abstract class AuthenticationState extends Equatable { - const AuthenticationState(); - - @override - List get props => []; -} - -class AppAutheticated extends AuthenticationState {} - -class AuthenticationInitial extends AuthenticationState {} - -class AuthenticationLoading extends AuthenticationState {} - -class AuthenticationStart extends AuthenticationState {} - -class UserLogoutState extends AuthenticationState {} - -class SetUserData extends AuthenticationState { - final String email; - final String avatar; - - SetUserData({this.email, this.avatar}); - // final CurrentUserData currentUserData; - // SetUserData({this.currentUserData}); - // @override - // List get props => [currentUserData]; -} - -class AuthenticationNotAuthenticated extends AuthenticationState { - final String message; - AuthenticationNotAuthenticated({this.message}); -} - -class AuthenticationFailure extends AuthenticationState { - final String message; - - AuthenticationFailure({@required this.message}); - - @override - List get props => [message]; -} diff --git a/examples/book-store-firebase/shared/lib/modules/authentication/bloc/bloc_controller.dart b/examples/book-store-firebase/shared/lib/modules/authentication/bloc/bloc_controller.dart deleted file mode 100644 index f5cadbc3..00000000 --- a/examples/book-store-firebase/shared/lib/modules/authentication/bloc/bloc_controller.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'package:shared/main.dart'; - -class AuthenticationBlocController { - AuthenticationBlocController._(); - static AuthenticationBlocController _instance = - AuthenticationBlocController._(); - factory AuthenticationBlocController() => _instance; - - // ignore: close_sinks - AuthenticationBloc authenticationBloc = AuthenticationBloc(); -} diff --git a/examples/book-store-firebase/shared/lib/modules/authentication/resources/authentication_repository.dart b/examples/book-store-firebase/shared/lib/modules/authentication/resources/authentication_repository.dart deleted file mode 100644 index 8192f55d..00000000 --- a/examples/book-store-firebase/shared/lib/modules/authentication/resources/authentication_repository.dart +++ /dev/null @@ -1,28 +0,0 @@ -import 'package:api_sdk/firebase_method/auth_services/firebase_auth.dart'; - -class AuthenticationRepository { - AuthService _auth = AuthService(); - Future signUpWithEmailAndPassword( - String email, String password) async { - await Future.delayed(Duration(seconds: 1)); // simulate a network delay - final response = await _auth.registerWithEmailAndPassword(email, password); - return response; - } - - Future loginWithEmailAndPassword( - String email, String password) async { - await Future.delayed(Duration(seconds: 1)); // simulate a network delay - final response = await _auth.signInWithEmailAndPassword(email, password); - return response; - } - - Future getUserData() async { - await Future.delayed(Duration(seconds: 1)); // simulate a network delay - final response = await _auth.getCurrentUser(); - return response; - } - - void logout() async { - _auth.signOut(); - } -} diff --git a/examples/book-store-firebase/shared/lib/modules/bookstore/models/book_store_model.dart b/examples/book-store-firebase/shared/lib/modules/bookstore/models/book_store_model.dart deleted file mode 100644 index d8a07231..00000000 --- a/examples/book-store-firebase/shared/lib/modules/bookstore/models/book_store_model.dart +++ /dev/null @@ -1,22 +0,0 @@ -class BookStore { - String id; - String author; - String name; - String img; - - BookStore({this.id, this.author, this.name, this.img}); - - BookStore.fromMap(Map snapshot, String id) - : id = id ?? '', - author = snapshot['author'] ?? '', - name = snapshot['name'] ?? '', - img = snapshot['img'] ?? ''; - - toJson() { - return { - "author": author, - "name": name, - "img": img, - }; - } -} diff --git a/examples/book-store-firebase/shared/lib/modules/bookstore/resources/firebase_crud_operations.dart b/examples/book-store-firebase/shared/lib/modules/bookstore/resources/firebase_crud_operations.dart deleted file mode 100644 index d61feb18..00000000 --- a/examples/book-store-firebase/shared/lib/modules/bookstore/resources/firebase_crud_operations.dart +++ /dev/null @@ -1,47 +0,0 @@ -import 'package:api_sdk/firebase_method/api_handles/firebase_api.dart'; -import 'package:flutter/material.dart'; -import 'package:shared/main.dart'; - -class FirebaseCRUDoperations extends ChangeNotifier { - FirebaseApi _api = locator(); - - List bookStore; - - Future addBookStore(BookStore data) async { - // ignore: unused_local_variable - var result = await _api.addDocument(data.toJson()); - notifyListeners(); - return; - } - - Future> fetchBookStores() async { - var result = await _api.getDataCollection(); - bookStore = result.docs - .map((doc) => BookStore.fromMap(doc.data(), doc.id)) - .toList(); - print(bookStore); - - return bookStore; - } - - Stream fetchBookStoresAsStream() { - return _api.streamDataCollection(); - } - - Future getBookStoreById(String id) async { - var doc = await _api.getDocumentById(id); - return BookStore.fromMap(doc.data(), doc.id); - } - - Future removeBookStore(String id) async { - await _api.removeDocument(id); - notifyListeners(); - return; - } - - Future updateBookStore(BookStore data, String id) async { - await _api.updateDocument(data.toJson(), id); - notifyListeners(); - return; - } -} diff --git a/examples/book-store-firebase/shared/pubspec.lock b/examples/book-store-firebase/shared/pubspec.lock deleted file mode 100644 index 9580a179..00000000 --- a/examples/book-store-firebase/shared/pubspec.lock +++ /dev/null @@ -1,621 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - api_sdk: - dependency: "direct main" - description: - path: "../api_sdk" - relative: true - source: path - version: "1.0.0+1" - args: - dependency: transitive - description: - name: args - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.0" - async: - dependency: transitive - description: - name: async - url: "https://pub.dartlang.org" - source: hosted - version: "2.8.2" - bloc: - dependency: "direct main" - description: - name: bloc - url: "https://pub.dartlang.org" - source: hosted - version: "8.0.3" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - characters: - dependency: transitive - description: - name: characters - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - clock: - dependency: transitive - description: - name: clock - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - cloud_firestore: - dependency: transitive - description: - name: cloud_firestore - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.10" - cloud_firestore_platform_interface: - dependency: transitive - description: - name: cloud_firestore_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "5.5.1" - cloud_firestore_web: - dependency: transitive - description: - name: cloud_firestore_web - url: "https://pub.dartlang.org" - source: hosted - version: "2.6.10" - collection: - dependency: transitive - description: - name: collection - url: "https://pub.dartlang.org" - source: hosted - version: "1.15.0" - connectivity_plus: - dependency: transitive - description: - name: connectivity_plus - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.1" - connectivity_plus_linux: - dependency: transitive - description: - name: connectivity_plus_linux - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - connectivity_plus_macos: - dependency: transitive - description: - name: connectivity_plus_macos - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.1" - connectivity_plus_platform_interface: - dependency: transitive - description: - name: connectivity_plus_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_web: - dependency: transitive - description: - name: connectivity_plus_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_windows: - dependency: transitive - description: - name: connectivity_plus_windows - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - crypto: - dependency: transitive - description: - name: crypto - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.4" - dbus: - dependency: transitive - description: - name: dbus - url: "https://pub.dartlang.org" - source: hosted - version: "0.7.1" - equatable: - dependency: "direct main" - description: - name: equatable - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - fake_async: - dependency: transitive - description: - name: fake_async - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - ffi: - dependency: transitive - description: - name: ffi - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.2" - file: - dependency: transitive - description: - name: file - url: "https://pub.dartlang.org" - source: hosted - version: "6.1.2" - firebase_auth: - dependency: transitive - description: - name: firebase_auth - url: "https://pub.dartlang.org" - source: hosted - version: "3.3.11" - firebase_auth_platform_interface: - dependency: transitive - description: - name: firebase_auth_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "6.2.1" - firebase_auth_web: - dependency: transitive - description: - name: firebase_auth_web - url: "https://pub.dartlang.org" - source: hosted - version: "3.3.9" - firebase_core: - dependency: transitive - description: - name: firebase_core - url: "https://pub.dartlang.org" - source: hosted - version: "1.13.1" - firebase_core_platform_interface: - dependency: transitive - description: - name: firebase_core_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "4.2.5" - firebase_core_web: - dependency: transitive - description: - name: firebase_core_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.6.1" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_bloc: - dependency: "direct main" - description: - name: flutter_bloc - url: "https://pub.dartlang.org" - source: hosted - version: "8.0.1" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - freezed_annotation: - dependency: transitive - description: - name: freezed_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - get_it: - dependency: "direct main" - description: - name: get_it - url: "https://pub.dartlang.org" - source: hosted - version: "7.2.0" - gql: - dependency: transitive - description: - name: gql - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.0" - gql_dedupe_link: - dependency: transitive - description: - name: gql_dedupe_link - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - gql_error_link: - dependency: transitive - description: - name: gql_error_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - gql_exec: - dependency: transitive - description: - name: gql_exec - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.0" - gql_http_link: - dependency: transitive - description: - name: gql_http_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.0" - gql_link: - dependency: transitive - description: - name: gql_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.0" - gql_transform_link: - dependency: transitive - description: - name: gql_transform_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - graphql: - dependency: transitive - description: - name: graphql - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.1" - graphql_flutter: - dependency: transitive - description: - name: graphql_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.1" - hive: - dependency: transitive - description: - name: hive - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - http: - dependency: transitive - description: - name: http - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.4" - http_parser: - dependency: transitive - description: - name: http_parser - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.0" - intl: - dependency: transitive - description: - name: intl - url: "https://pub.dartlang.org" - source: hosted - version: "0.17.0" - js: - dependency: transitive - description: - name: js - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.3" - json_annotation: - dependency: transitive - description: - name: json_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "4.4.0" - matcher: - dependency: transitive - description: - name: matcher - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.11" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.3" - meta: - dependency: transitive - description: - name: meta - url: "https://pub.dartlang.org" - source: hosted - version: "1.7.0" - nested: - dependency: transitive - description: - name: nested - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - nm: - dependency: transitive - description: - name: nm - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.0" - normalize: - dependency: transitive - description: - name: normalize - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.0+1" - path: - dependency: transitive - description: - name: path - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0" - path_provider: - dependency: "direct main" - description: - name: path_provider - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.9" - path_provider_android: - dependency: transitive - description: - name: path_provider_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.12" - path_provider_ios: - dependency: transitive - description: - name: path_provider_ios - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.8" - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.5" - path_provider_macos: - dependency: transitive - description: - name: path_provider_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - petitparser: - dependency: transitive - description: - name: petitparser - url: "https://pub.dartlang.org" - source: hosted - version: "4.4.0" - platform: - dependency: transitive - description: - name: platform - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.2" - process: - dependency: transitive - description: - name: process - url: "https://pub.dartlang.org" - source: hosted - version: "4.2.4" - provider: - dependency: transitive - description: - name: provider - url: "https://pub.dartlang.org" - source: hosted - version: "6.0.2" - rxdart: - dependency: transitive - description: - name: rxdart - url: "https://pub.dartlang.org" - source: hosted - version: "0.27.3" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_span: - dependency: transitive - description: - name: source_span - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.1" - sqflite: - dependency: "direct main" - description: - name: sqflite - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.2" - sqflite_common: - dependency: transitive - description: - name: sqflite_common - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.1" - stack_trace: - dependency: transitive - description: - name: stack_trace - url: "https://pub.dartlang.org" - source: hosted - version: "1.10.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - synchronized: - dependency: transitive - description: - name: synchronized - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - test_api: - dependency: transitive - description: - name: test_api - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.8" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - uuid: - dependency: transitive - description: - name: uuid - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.6" - vector_math: - dependency: transitive - description: - name: vector_math - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - win32: - dependency: transitive - description: - name: win32 - url: "https://pub.dartlang.org" - source: hosted - version: "2.4.2" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0+1" - xml: - dependency: transitive - description: - name: xml - url: "https://pub.dartlang.org" - source: hosted - version: "5.3.1" -sdks: - dart: ">=2.16.0 <3.0.0" - flutter: ">=2.8.0" diff --git a/examples/book-store-firebase/shared/pubspec.yaml b/examples/book-store-firebase/shared/pubspec.yaml deleted file mode 100644 index bc5c54e1..00000000 --- a/examples/book-store-firebase/shared/pubspec.yaml +++ /dev/null @@ -1,84 +0,0 @@ -name: shared -description: A new Flutter project. - -# The following line prevents the package from being accidentally published to -# pub.dev using `pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev - -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.0+1 - -environment: - sdk: ">=2.7.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.0 - sqflite: ^2.0.2 - path_provider: ^2.0.9 - bloc: ^8.0.3 - flutter_bloc: ^8.0.1 - get_it: ^7.2.0 - equatable: ^2.0.3 - api_sdk: - path: ../api_sdk - -dev_dependencies: - flutter_test: - sdk: flutter - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter. -flutter: - - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. - uses-material-design: true - - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware. - - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/assets-and-images/#from-packages - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/custom-fonts/#from-packages diff --git a/examples/book-store-firebase/shared/test/widget_test.dart b/examples/book-store-firebase/shared/test/widget_test.dart deleted file mode 100644 index 570e0e47..00000000 --- a/examples/book-store-firebase/shared/test/widget_test.dart +++ /dev/null @@ -1,8 +0,0 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility that Flutter provides. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - -void main() {} diff --git a/examples/github-repository-list/README.md b/examples/github-repository-list/README.md deleted file mode 100644 index bd10ede0..00000000 --- a/examples/github-repository-list/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# flutter-starter-kit - -A Hacker news App (boilerplate). - -- To run - Run this `bash run_script.sh` at root directory. - -The api url is in `api-constants.dart` -Go to your github account and create a personal access token. - -```dart -//For the graphql. -import 'package:graphql/client.dart'; - -OptimisticCache cache = OptimisticCache( - dataIdFromObject: typenameDataIdFromObject, -); -GraphQLClient client() { - final HttpLink _httpLink = HttpLink( - uri: 'https://api.github.com/graphql', - ); - - final AuthLink _authLink = AuthLink( - getToken: () => 'Bearer YOUR GITHUB API TOKEN', - ); - - final Link _link = _authLink.concat(_httpLink); - - return GraphQLClient( - cache: cache, - link: _link, - ); -} - -//For the Rest -Map apiConstants = {"auth": "https://reqres.in/api"}; - -``` -To Signup use this credantials: -``` -Email "eve.holt@reqres.in", -Password "pistol" -``` -The demo for the app looks like this: - - \ No newline at end of file diff --git a/examples/github-repository-list/api_sdk/.gitignore b/examples/github-repository-list/api_sdk/.gitignore deleted file mode 100644 index 9d532b18..00000000 --- a/examples/github-repository-list/api_sdk/.gitignore +++ /dev/null @@ -1,41 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json diff --git a/examples/github-repository-list/api_sdk/.metadata b/examples/github-repository-list/api_sdk/.metadata deleted file mode 100644 index 107fcb7b..00000000 --- a/examples/github-repository-list/api_sdk/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 8874f21e79d7ec66d0457c7ab338348e31b17f1d - channel: stable - -project_type: app diff --git a/examples/github-repository-list/api_sdk/README.md b/examples/github-repository-list/api_sdk/README.md deleted file mode 100644 index 39e5a3fa..00000000 --- a/examples/github-repository-list/api_sdk/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# api_sdk - -A new Flutter project. - -## Getting Started - -This project is a starting point for a Flutter application. - -A few resources to get you started if this is your first Flutter project: - -- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) - -For help getting started with Flutter, view our -[online documentation](https://flutter.dev/docs), which offers tutorials, -samples, guidance on mobile development, and a full API reference. diff --git a/examples/github-repository-list/api_sdk/lib/api_constants.dart b/examples/github-repository-list/api_sdk/lib/api_constants.dart deleted file mode 100644 index 6834526a..00000000 --- a/examples/github-repository-list/api_sdk/lib/api_constants.dart +++ /dev/null @@ -1,32 +0,0 @@ -//For the graphql. -import 'package:graphql/client.dart'; - -Map apiConstants = {"auth": "https://reqres.in/api"}; -GraphQLCache cache = GraphQLCache( - dataIdFromObject: (object) { - if (object is Map && - object.containsKey('__typename') && - object.containsKey('id')) { - return "${object['__typename']}/${object['id']}"; - } - return null; - }, -); - -//For the rest. -GraphQLClient client() { - final HttpLink _httpLink = HttpLink( - 'https://api.github.com/graphql', - ); - - final AuthLink _authLink = AuthLink( - getToken: () => 'Bearer YOUR GITHUB ACCESS TOKEN', - ); - - final Link _link = _authLink.concat(_httpLink); - - return GraphQLClient( - cache: cache, - link: _link, - ); -} diff --git a/examples/github-repository-list/api_sdk/lib/graphql_method/graphql_handler.dart b/examples/github-repository-list/api_sdk/lib/graphql_method/graphql_handler.dart deleted file mode 100644 index 254aa60a..00000000 --- a/examples/github-repository-list/api_sdk/lib/graphql_method/graphql_handler.dart +++ /dev/null @@ -1,42 +0,0 @@ -import 'dart:async'; - -import 'package:api_sdk/graphql_method/graphql_operation/mutations/mutations.dart' - as mutations; -import 'package:api_sdk/graphql_method/graphql_operation/queries/readRepositories.dart' - as queries; -import 'package:flutter/widgets.dart'; -import 'package:gql/language.dart'; -import 'package:graphql/client.dart'; - -class GraphqlQlHandler { - final GraphQLClient client; - - GraphqlQlHandler({@required this.client}) : assert(client != null); - - Future getRepositories(int numOfRepositories) async { - final WatchQueryOptions _options = WatchQueryOptions( - document: parseString(queries.readRepositories), - variables: { - 'nRepositories': numOfRepositories, - }, - pollInterval: Duration(seconds: 4), - fetchResults: true, - ); - - return await client.query(_options); - } - - Future toggleRepoStar(dynamic repo) async { - var document = - repo.viewerHasStarred ? mutations.removeStar : mutations.addStar; - - final MutationOptions _options = MutationOptions( - document: parseString(document), - variables: { - 'starrableId': repo.id, - }, - ); - - return await client.mutate(_options); - } -} diff --git a/examples/github-repository-list/api_sdk/lib/graphql_method/graphql_operation/mutations/add_star.dart b/examples/github-repository-list/api_sdk/lib/graphql_method/graphql_operation/mutations/add_star.dart deleted file mode 100644 index aabb7900..00000000 --- a/examples/github-repository-list/api_sdk/lib/graphql_method/graphql_operation/mutations/add_star.dart +++ /dev/null @@ -1,9 +0,0 @@ -const String addStar = r''' - mutation AddStar($starrableId: ID!) { - action: addStar(input: {starrableId: $starrableId}) { - starrable { - viewerHasStarred - } - } - } -'''; diff --git a/examples/github-repository-list/api_sdk/lib/graphql_method/graphql_operation/mutations/mutations.dart b/examples/github-repository-list/api_sdk/lib/graphql_method/graphql_operation/mutations/mutations.dart deleted file mode 100644 index 79cead37..00000000 --- a/examples/github-repository-list/api_sdk/lib/graphql_method/graphql_operation/mutations/mutations.dart +++ /dev/null @@ -1,2 +0,0 @@ -export './add_star.dart'; -export './remove_star.dart'; diff --git a/examples/github-repository-list/api_sdk/lib/graphql_method/graphql_operation/mutations/remove_star.dart b/examples/github-repository-list/api_sdk/lib/graphql_method/graphql_operation/mutations/remove_star.dart deleted file mode 100644 index 69f33295..00000000 --- a/examples/github-repository-list/api_sdk/lib/graphql_method/graphql_operation/mutations/remove_star.dart +++ /dev/null @@ -1,9 +0,0 @@ -const String removeStar = r''' - mutation RemoveStar($starrableId: ID!) { - action: removeStar(input: {starrableId: $starrableId}) { - starrable { - viewerHasStarred - } - } - } -'''; diff --git a/examples/github-repository-list/api_sdk/lib/graphql_method/graphql_operation/queries/readRepositories.dart b/examples/github-repository-list/api_sdk/lib/graphql_method/graphql_operation/queries/readRepositories.dart deleted file mode 100644 index 8eceea11..00000000 --- a/examples/github-repository-list/api_sdk/lib/graphql_method/graphql_operation/queries/readRepositories.dart +++ /dev/null @@ -1,23 +0,0 @@ -const String readRepositories = r''' - query ReadRepositories($nRepositories: Int!) { - viewer { - repositories(last: $nRepositories) { - nodes { - __typename - id - name - viewerHasStarred - } - } - } - } -'''; - -const String testSubscription = r''' - subscription test { - deviceChanged(id: 2) { - id - name - } - } -'''; diff --git a/examples/github-repository-list/api_sdk/lib/main.dart b/examples/github-repository-list/api_sdk/lib/main.dart deleted file mode 100644 index f25913fe..00000000 --- a/examples/github-repository-list/api_sdk/lib/main.dart +++ /dev/null @@ -1,30 +0,0 @@ -import 'package:api_sdk/api_constants.dart'; -import 'package:api_sdk/graphql_method/graphql_handler.dart'; -import 'package:api_sdk/rest/rest_api_handler_data.dart'; - -class ApiSdk { - static loginWithEmailAndPassword(dynamic body) async { - final response = await RestApiHandlerData.postData( - '${apiConstants["auth"]}/login', body); - return response; - } - - static signUpWithEmailAndPassword(dynamic body) async { - final response = await RestApiHandlerData.postData( - '${apiConstants["auth"]}/register', body); - return response; - } - - static getUserData(int id) async { - final response = - await RestApiHandlerData.getData('${apiConstants["auth"]}/users/$id'); - return response; - } - - static fetchGithubRepoGraphQl(numOfRepositories) async { - final GraphqlQlHandler githubRepository = - GraphqlQlHandler(client: client()); - final response = await githubRepository.getRepositories(numOfRepositories); - return response; - } -} diff --git a/examples/github-repository-list/api_sdk/lib/rest/api_helpers/api_base_helper.dart b/examples/github-repository-list/api_sdk/lib/rest/api_helpers/api_base_helper.dart deleted file mode 100644 index 26fc9682..00000000 --- a/examples/github-repository-list/api_sdk/lib/rest/api_helpers/api_base_helper.dart +++ /dev/null @@ -1,72 +0,0 @@ -import 'dart:convert'; -import 'dart:io'; - -import 'package:http/http.dart' as http; - -import 'api_exception.dart'; - -dynamic _returnResponse(http.Response response) { - switch (response.statusCode) { - case 200: - var responseJson = json.decode(response.body.toString()); - return responseJson; - case 400: - return json.decode(response.body.toString()); - case 401: - case 403: - return json.decode(response.body.toString()); - case 500: - default: - return FetchDataException( - 'Error occured while Communication with Server with StatusCode : ${response.statusCode}'); - } -} - -class ApiBaseHelper { - Future delete(String url) async { - var apiResponse; - try { - final response = await http.delete(Uri.parse(url)); - apiResponse = _returnResponse(response); - } on SocketException { - throw FetchDataException('No Internet connection'); - } - - return apiResponse; - } - - Future get(String url) async { - var responseJson; - try { - final response = await http.get(Uri.parse(url)); - responseJson = _returnResponse(response); - } on SocketException { - throw FetchDataException('No Internet connection'); - } - return responseJson; - } - - Future post(String url, dynamic body) async { - var responseJson; - try { - final response = await http.post(Uri.parse(url), body: body); - responseJson = _returnResponse(response); - } on SocketException { - throw FetchDataException('No Internet connection'); - } - - return responseJson; - } - - Future put(String url, dynamic body) async { - var responseJson; - try { - final response = await http.put(Uri.parse(url), body: body); - responseJson = _returnResponse(response); - } on SocketException { - throw FetchDataException('No Internet connection'); - } - - return responseJson; - } -} diff --git a/examples/github-repository-list/api_sdk/lib/rest/api_helpers/api_exception.dart b/examples/github-repository-list/api_sdk/lib/rest/api_helpers/api_exception.dart deleted file mode 100644 index acdc758e..00000000 --- a/examples/github-repository-list/api_sdk/lib/rest/api_helpers/api_exception.dart +++ /dev/null @@ -1,27 +0,0 @@ -class AppException implements Exception { - final _message; - final _prefix; - - AppException([this._message, this._prefix]); - - String toString() { - return "$_prefix$_message"; - } -} - -class FetchDataException extends AppException { - FetchDataException([String message]) - : super(message, "Error During Communication: "); -} - -class BadRequestException extends AppException { - BadRequestException([message]) : super(message, "Invalid Request: "); -} - -class UnauthorisedException extends AppException { - UnauthorisedException([message]) : super(message, "Unauthorised: "); -} - -class InvalidInputException extends AppException { - InvalidInputException([String message]) : super(message, "Invalid Input: "); -} diff --git a/examples/github-repository-list/api_sdk/lib/rest/rest_api_handler_data.dart b/examples/github-repository-list/api_sdk/lib/rest/rest_api_handler_data.dart deleted file mode 100644 index 8dd7e51b..00000000 --- a/examples/github-repository-list/api_sdk/lib/rest/rest_api_handler_data.dart +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:api_sdk/rest/api_helpers/api_base_helper.dart'; - -class RestApiHandlerData { - static ApiBaseHelper _apiBaseHelper = ApiBaseHelper(); - static getData(String path) async { - final response = await _apiBaseHelper.get('$path'); - return response; - } - - static postData(String path, dynamic body) async { - final response = await _apiBaseHelper.post('$path', body); - return response; - } -} diff --git a/examples/github-repository-list/api_sdk/pubspec.lock b/examples/github-repository-list/api_sdk/pubspec.lock deleted file mode 100644 index d4fa3f9a..00000000 --- a/examples/github-repository-list/api_sdk/pubspec.lock +++ /dev/null @@ -1,488 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - args: - dependency: transitive - description: - name: args - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.0" - async: - dependency: transitive - description: - name: async - url: "https://pub.dartlang.org" - source: hosted - version: "2.8.2" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - characters: - dependency: transitive - description: - name: characters - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - clock: - dependency: transitive - description: - name: clock - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - collection: - dependency: transitive - description: - name: collection - url: "https://pub.dartlang.org" - source: hosted - version: "1.15.0" - connectivity_plus: - dependency: transitive - description: - name: connectivity_plus - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.1" - connectivity_plus_linux: - dependency: transitive - description: - name: connectivity_plus_linux - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - connectivity_plus_macos: - dependency: transitive - description: - name: connectivity_plus_macos - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.1" - connectivity_plus_platform_interface: - dependency: transitive - description: - name: connectivity_plus_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_web: - dependency: transitive - description: - name: connectivity_plus_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_windows: - dependency: transitive - description: - name: connectivity_plus_windows - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - crypto: - dependency: transitive - description: - name: crypto - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.4" - dbus: - dependency: transitive - description: - name: dbus - url: "https://pub.dartlang.org" - source: hosted - version: "0.7.1" - equatable: - dependency: "direct main" - description: - name: equatable - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - fake_async: - dependency: transitive - description: - name: fake_async - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - ffi: - dependency: transitive - description: - name: ffi - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.2" - file: - dependency: transitive - description: - name: file - url: "https://pub.dartlang.org" - source: hosted - version: "6.1.2" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - freezed_annotation: - dependency: "direct main" - description: - name: freezed_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - gql: - dependency: "direct main" - description: - name: gql - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.0" - gql_dedupe_link: - dependency: transitive - description: - name: gql_dedupe_link - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - gql_error_link: - dependency: transitive - description: - name: gql_error_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - gql_exec: - dependency: transitive - description: - name: gql_exec - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.0" - gql_http_link: - dependency: transitive - description: - name: gql_http_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.0" - gql_link: - dependency: transitive - description: - name: gql_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.0" - gql_transform_link: - dependency: transitive - description: - name: gql_transform_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - graphql: - dependency: "direct main" - description: - name: graphql - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.1" - graphql_flutter: - dependency: "direct main" - description: - name: graphql_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.1" - hive: - dependency: transitive - description: - name: hive - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - http: - dependency: "direct main" - description: - name: http - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.4" - http_parser: - dependency: transitive - description: - name: http_parser - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.0" - js: - dependency: transitive - description: - name: js - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.3" - json_annotation: - dependency: transitive - description: - name: json_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "4.4.0" - matcher: - dependency: transitive - description: - name: matcher - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.11" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.3" - meta: - dependency: transitive - description: - name: meta - url: "https://pub.dartlang.org" - source: hosted - version: "1.7.0" - nm: - dependency: transitive - description: - name: nm - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.0" - normalize: - dependency: transitive - description: - name: normalize - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.0+1" - path: - dependency: transitive - description: - name: path - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0" - path_provider: - dependency: transitive - description: - name: path_provider - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.9" - path_provider_android: - dependency: transitive - description: - name: path_provider_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.12" - path_provider_ios: - dependency: transitive - description: - name: path_provider_ios - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.8" - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.5" - path_provider_macos: - dependency: transitive - description: - name: path_provider_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - petitparser: - dependency: transitive - description: - name: petitparser - url: "https://pub.dartlang.org" - source: hosted - version: "4.4.0" - platform: - dependency: transitive - description: - name: platform - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.2" - process: - dependency: transitive - description: - name: process - url: "https://pub.dartlang.org" - source: hosted - version: "4.2.4" - rxdart: - dependency: transitive - description: - name: rxdart - url: "https://pub.dartlang.org" - source: hosted - version: "0.27.3" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_span: - dependency: transitive - description: - name: source_span - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.1" - stack_trace: - dependency: transitive - description: - name: stack_trace - url: "https://pub.dartlang.org" - source: hosted - version: "1.10.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - test_api: - dependency: transitive - description: - name: test_api - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.8" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - uuid: - dependency: transitive - description: - name: uuid - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.6" - vector_math: - dependency: transitive - description: - name: vector_math - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - win32: - dependency: transitive - description: - name: win32 - url: "https://pub.dartlang.org" - source: hosted - version: "2.4.2" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0+1" - xml: - dependency: transitive - description: - name: xml - url: "https://pub.dartlang.org" - source: hosted - version: "5.3.1" -sdks: - dart: ">=2.15.0 <3.0.0" - flutter: ">=2.8.0" diff --git a/examples/github-repository-list/api_sdk/pubspec.yaml b/examples/github-repository-list/api_sdk/pubspec.yaml deleted file mode 100644 index 749a87a9..00000000 --- a/examples/github-repository-list/api_sdk/pubspec.yaml +++ /dev/null @@ -1,84 +0,0 @@ -name: api_sdk -description: A new Flutter project. - -# The following line prevents the package from being accidentally published to -# pub.dev using `pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev - -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.0+1 - -environment: - sdk: ">=2.7.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.0 - http: - - graphql: ^5.0.1 - graphql_flutter: ^5.0.1 - gql: ^0.13.0 - freezed_annotation: ^1.1.0 - - equatable: ^2.0.3 - -dev_dependencies: - flutter_test: - sdk: flutter - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter. -flutter: - - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. - uses-material-design: true - - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware. - - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/assets-and-images/#from-packages - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/custom-fonts/#from-packages diff --git a/examples/github-repository-list/api_sdk/test/widget_test.dart b/examples/github-repository-list/api_sdk/test/widget_test.dart deleted file mode 100644 index 570e0e47..00000000 --- a/examples/github-repository-list/api_sdk/test/widget_test.dart +++ /dev/null @@ -1,8 +0,0 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility that Flutter provides. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - -void main() {} diff --git a/examples/github-repository-list/app/.gitignore b/examples/github-repository-list/app/.gitignore deleted file mode 100644 index 0fa6b675..00000000 --- a/examples/github-repository-list/app/.gitignore +++ /dev/null @@ -1,46 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json - -# Android Studio will place build artifacts here -/android/app/debug -/android/app/profile -/android/app/release diff --git a/examples/github-repository-list/app/.metadata b/examples/github-repository-list/app/.metadata deleted file mode 100644 index 5a023280..00000000 --- a/examples/github-repository-list/app/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 7e9793dee1b85a243edd0e06cb1658e98b077561 - channel: stable - -project_type: app diff --git a/examples/github-repository-list/app/README.md b/examples/github-repository-list/app/README.md deleted file mode 100644 index e7694a28..00000000 --- a/examples/github-repository-list/app/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# app - -A new Flutter project. - -## Getting Started - -This project is a starting point for a Flutter application. - -A few resources to get you started if this is your first Flutter project: - -- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) - -For help getting started with Flutter, view our -[online documentation](https://flutter.dev/docs), which offers tutorials, -samples, guidance on mobile development, and a full API reference. diff --git a/examples/github-repository-list/app/analysis_options.yaml b/examples/github-repository-list/app/analysis_options.yaml deleted file mode 100644 index 61b6c4de..00000000 --- a/examples/github-repository-list/app/analysis_options.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# This file configures the analyzer, which statically analyzes Dart code to -# check for errors, warnings, and lints. -# -# The issues identified by the analyzer are surfaced in the UI of Dart-enabled -# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be -# invoked from the command line by running `flutter analyze`. - -# 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 - -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` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at - # https://dart-lang.github.io/linter/lints/index.html. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. - rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/examples/github-repository-list/app/android/.gitignore b/examples/github-repository-list/app/android/.gitignore deleted file mode 100644 index 6f568019..00000000 --- a/examples/github-repository-list/app/android/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java - -# Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app -key.properties -**/*.keystore -**/*.jks diff --git a/examples/github-repository-list/app/android/app/build.gradle b/examples/github-repository-list/app/android/app/build.gradle deleted file mode 100644 index 2a6af6eb..00000000 --- a/examples/github-repository-list/app/android/app/build.gradle +++ /dev/null @@ -1,68 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion flutter.compileSdkVersion - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = '1.8' - } - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.app" - minSdkVersion flutter.minSdkVersion - targetSdkVersion flutter.targetSdkVersion - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/examples/github-repository-list/app/android/app/src/debug/AndroidManifest.xml b/examples/github-repository-list/app/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index 99f406bd..00000000 --- a/examples/github-repository-list/app/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/examples/github-repository-list/app/android/app/src/main/res/drawable-v21/launch_background.xml b/examples/github-repository-list/app/android/app/src/main/res/drawable-v21/launch_background.xml deleted file mode 100644 index f74085f3..00000000 --- a/examples/github-repository-list/app/android/app/src/main/res/drawable-v21/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/examples/github-repository-list/app/android/app/src/main/res/drawable/launch_background.xml b/examples/github-repository-list/app/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f8..00000000 --- a/examples/github-repository-list/app/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/examples/github-repository-list/app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/examples/github-repository-list/app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b..00000000 Binary files a/examples/github-repository-list/app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/examples/github-repository-list/app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/examples/github-repository-list/app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79..00000000 Binary files a/examples/github-repository-list/app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/examples/github-repository-list/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/examples/github-repository-list/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d43914..00000000 Binary files a/examples/github-repository-list/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/github-repository-list/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/examples/github-repository-list/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d3..00000000 Binary files a/examples/github-repository-list/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/github-repository-list/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/examples/github-repository-list/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372ee..00000000 Binary files a/examples/github-repository-list/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/github-repository-list/app/android/app/src/main/res/values/styles.xml b/examples/github-repository-list/app/android/app/src/main/res/values/styles.xml deleted file mode 100644 index d460d1e9..00000000 --- a/examples/github-repository-list/app/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/examples/github-repository-list/app/android/app/src/profile/AndroidManifest.xml b/examples/github-repository-list/app/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index 99f406bd..00000000 --- a/examples/github-repository-list/app/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/examples/github-repository-list/app/android/gradle.properties b/examples/github-repository-list/app/android/gradle.properties deleted file mode 100644 index 94adc3a3..00000000 --- a/examples/github-repository-list/app/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.useAndroidX=true -android.enableJetifier=true diff --git a/examples/github-repository-list/app/android/gradle/wrapper/gradle-wrapper.properties b/examples/github-repository-list/app/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index bc6a58af..00000000 --- a/examples/github-repository-list/app/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip diff --git a/examples/github-repository-list/app/android/settings.gradle b/examples/github-repository-list/app/android/settings.gradle deleted file mode 100644 index 44e62bcf..00000000 --- a/examples/github-repository-list/app/android/settings.gradle +++ /dev/null @@ -1,11 +0,0 @@ -include ':app' - -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() - -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } - -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/examples/github-repository-list/app/assets/images/2.0x/logo.png b/examples/github-repository-list/app/assets/images/2.0x/logo.png deleted file mode 100644 index f2c967ff..00000000 Binary files a/examples/github-repository-list/app/assets/images/2.0x/logo.png and /dev/null differ diff --git a/examples/github-repository-list/app/assets/images/3.0x/logo.png b/examples/github-repository-list/app/assets/images/3.0x/logo.png deleted file mode 100644 index 6b5dcc95..00000000 Binary files a/examples/github-repository-list/app/assets/images/3.0x/logo.png and /dev/null differ diff --git a/examples/github-repository-list/app/assets/images/logo.png b/examples/github-repository-list/app/assets/images/logo.png deleted file mode 100644 index aba93c52..00000000 Binary files a/examples/github-repository-list/app/assets/images/logo.png and /dev/null differ diff --git a/examples/github-repository-list/app/ios/.gitignore b/examples/github-repository-list/app/ios/.gitignore deleted file mode 100644 index 7a7f9873..00000000 --- a/examples/github-repository-list/app/ios/.gitignore +++ /dev/null @@ -1,34 +0,0 @@ -**/dgph -*.mode1v3 -*.mode2v3 -*.moved-aside -*.pbxuser -*.perspectivev3 -**/*sync/ -.sconsign.dblite -.tags* -**/.vagrant/ -**/DerivedData/ -Icon? -**/Pods/ -**/.symlinks/ -profile -xcuserdata -**/.generated/ -Flutter/App.framework -Flutter/Flutter.framework -Flutter/Flutter.podspec -Flutter/Generated.xcconfig -Flutter/ephemeral/ -Flutter/app.flx -Flutter/app.zip -Flutter/flutter_assets/ -Flutter/flutter_export_environment.sh -ServiceDefinitions.json -Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!default.mode1v3 -!default.mode2v3 -!default.pbxuser -!default.perspectivev3 diff --git a/examples/github-repository-list/app/ios/Flutter/AppFrameworkInfo.plist b/examples/github-repository-list/app/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 8d4492f9..00000000 --- a/examples/github-repository-list/app/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 9.0 - - diff --git a/examples/github-repository-list/app/ios/Flutter/Debug.xcconfig b/examples/github-repository-list/app/ios/Flutter/Debug.xcconfig deleted file mode 100644 index 592ceee8..00000000 --- a/examples/github-repository-list/app/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/examples/github-repository-list/app/ios/Flutter/Release.xcconfig b/examples/github-repository-list/app/ios/Flutter/Release.xcconfig deleted file mode 100644 index 592ceee8..00000000 --- a/examples/github-repository-list/app/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/examples/github-repository-list/app/ios/Runner.xcodeproj/project.pbxproj b/examples/github-repository-list/app/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index fb16edd3..00000000 --- a/examples/github-repository-list/app/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,481 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 50; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - ); - path = Runner; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1300; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 1100; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - 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_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - 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_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.app; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - 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_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - 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_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - 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_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - 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_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - 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_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.app; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.app; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/examples/github-repository-list/app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/github-repository-list/app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6..00000000 --- a/examples/github-repository-list/app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/examples/github-repository-list/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/github-repository-list/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/examples/github-repository-list/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/github-repository-list/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/github-repository-list/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5..00000000 --- a/examples/github-repository-list/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/examples/github-repository-list/app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/examples/github-repository-list/app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index c87d15a3..00000000 --- a/examples/github-repository-list/app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/github-repository-list/app/ios/Runner.xcworkspace/contents.xcworkspacedata b/examples/github-repository-list/app/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16..00000000 --- a/examples/github-repository-list/app/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/examples/github-repository-list/app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/github-repository-list/app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/examples/github-repository-list/app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/github-repository-list/app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/github-repository-list/app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5..00000000 --- a/examples/github-repository-list/app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/examples/github-repository-list/app/ios/Runner/AppDelegate.swift b/examples/github-repository-list/app/ios/Runner/AppDelegate.swift deleted file mode 100644 index 70693e4a..00000000 --- a/examples/github-repository-list/app/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import UIKit -import Flutter - -@UIApplicationMain -@objc class AppDelegate: FlutterAppDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } -} diff --git a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d36b1fab..00000000 --- a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "Icon-App-1024x1024@1x.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada47..00000000 Binary files a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf03..00000000 Binary files a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd96..00000000 Binary files a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0..00000000 Binary files a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde1211..00000000 Binary files a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7..00000000 Binary files a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306..00000000 Binary files a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd96..00000000 Binary files a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f..00000000 Binary files a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b860..00000000 Binary files a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b860..00000000 Binary files a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164..00000000 Binary files a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d3..00000000 Binary files a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e..00000000 Binary files a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f585..00000000 Binary files a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/examples/github-repository-list/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 0bedcf2f..00000000 --- a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "LaunchImage.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/examples/github-repository-list/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eac..00000000 Binary files a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/examples/github-repository-list/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eac..00000000 Binary files a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/examples/github-repository-list/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eac..00000000 Binary files a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/examples/github-repository-list/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b..00000000 --- a/examples/github-repository-list/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/examples/github-repository-list/app/ios/Runner/Base.lproj/LaunchScreen.storyboard b/examples/github-repository-list/app/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7..00000000 --- a/examples/github-repository-list/app/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/github-repository-list/app/ios/Runner/Base.lproj/Main.storyboard b/examples/github-repository-list/app/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516..00000000 --- a/examples/github-repository-list/app/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/github-repository-list/app/ios/Runner/Runner-Bridging-Header.h b/examples/github-repository-list/app/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 308a2a56..00000000 --- a/examples/github-repository-list/app/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" diff --git a/examples/github-repository-list/app/lib/main.dart b/examples/github-repository-list/app/lib/main.dart deleted file mode 100644 index e5859d7c..00000000 --- a/examples/github-repository-list/app/lib/main.dart +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:app/src/app.dart'; -import 'package:app/src/utils/app_state_notifier.dart'; -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -void main() { - runApp( - ChangeNotifierProvider( - create: (_) => AppStateNotifier(), - child: App(), - ), - ); -} diff --git a/examples/github-repository-list/app/lib/src/app.dart b/examples/github-repository-list/app/lib/src/app.dart deleted file mode 100644 index 44213c7c..00000000 --- a/examples/github-repository-list/app/lib/src/app.dart +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:app/src/config/theme_data.dart'; -import 'package:app/src/routes/index.dart'; -import 'package:app/src/utils/app_state_notifier.dart'; -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -class App extends StatelessWidget { - Widget build(BuildContext context) { - return Consumer(builder: (context, appState, child) { - return MaterialApp( - title: 'News!', - theme: ThemeConfig.lightTheme, - darkTheme: ThemeConfig.darkTheme, - themeMode: appState.isDarkMode ? ThemeMode.dark : ThemeMode.light, - onGenerateRoute: routes, - ); - }); - } -} diff --git a/examples/github-repository-list/app/lib/src/config/color_constants.dart b/examples/github-repository-list/app/lib/src/config/color_constants.dart deleted file mode 100644 index 6801b766..00000000 --- a/examples/github-repository-list/app/lib/src/config/color_constants.dart +++ /dev/null @@ -1,19 +0,0 @@ -import 'dart:ui'; -import 'package:flutter/material.dart'; - -Color hexToColor(String hex) { - assert(RegExp(r'^#([0-9a-fA-F]{6})|([0-9a-fA-F]{8})$').hasMatch(hex), - 'hex color must be #rrggbb or #rrggbbaa'); - - return Color( - int.parse(hex.substring(1), radix: 16) + - (hex.length == 7 ? 0xff000000 : 0x00000000), - ); -} - -class ColorConstants { - static Color lightScaffoldBackgroundColor = hexToColor('#F9F9F9'); - static Color darkScaffoldBackgroundColor = hexToColor('#2F2E2E'); - static Color secondaryAppColor = hexToColor('#5E92F3'); - static Color secondaryDarkAppColor = Colors.white; -} diff --git a/examples/github-repository-list/app/lib/src/config/image_constants.dart b/examples/github-repository-list/app/lib/src/config/image_constants.dart deleted file mode 100644 index e9a8cc01..00000000 --- a/examples/github-repository-list/app/lib/src/config/image_constants.dart +++ /dev/null @@ -1,10 +0,0 @@ -class AllImages { - AllImages._(); - static AllImages _instance = AllImages._(); - factory AllImages() => _instance; - - String image = 'assets/image'; - String logo = 'assets/images/logo.png'; - String kDefaultImage = - 'https://cdn.pixabay.com/photo/2016/08/08/09/17/avatar-1577909_1280.png'; -} diff --git a/examples/github-repository-list/app/lib/src/config/string_constants.dart b/examples/github-repository-list/app/lib/src/config/string_constants.dart deleted file mode 100644 index 8cd93a9f..00000000 --- a/examples/github-repository-list/app/lib/src/config/string_constants.dart +++ /dev/null @@ -1,15 +0,0 @@ -library constants; - -// Onboarding Screens -const String app_name = "APP NAME"; - -// tabs -const String tab0 = "Tab 0"; -const String tab1 = "Tab 1"; -const String tab2 = "Tab 2"; -const String tab3 = "Tab 3"; - -//Screen 1 -const String screen_util = "Screen"; -//home -const String app_bar_title = 'Your Repositories'; diff --git a/examples/github-repository-list/app/lib/src/config/theme_data.dart b/examples/github-repository-list/app/lib/src/config/theme_data.dart deleted file mode 100644 index 5f76a010..00000000 --- a/examples/github-repository-list/app/lib/src/config/theme_data.dart +++ /dev/null @@ -1,215 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; - -import 'color_constants.dart'; - -class ThemeConfig { - static ThemeData get darkTheme => createTheme( - brightness: Brightness.dark, - background: ColorConstants.darkScaffoldBackgroundColor, - cardBackground: ColorConstants.secondaryDarkAppColor, - primaryText: Colors.white, - secondaryText: Colors.black, - accentColor: ColorConstants.secondaryDarkAppColor, - divider: Colors.black45, - buttonBackground: Colors.white, - buttonText: ColorConstants.secondaryDarkAppColor, - disabled: ColorConstants.secondaryDarkAppColor, - error: Colors.red, - ); - - static ThemeData get lightTheme => createTheme( - brightness: Brightness.light, - background: ColorConstants.lightScaffoldBackgroundColor, - cardBackground: ColorConstants.secondaryAppColor, - primaryText: Colors.black, - secondaryText: Colors.white, - accentColor: ColorConstants.secondaryAppColor, - divider: ColorConstants.secondaryAppColor, - buttonBackground: Colors.black38, - buttonText: ColorConstants.secondaryAppColor, - disabled: ColorConstants.secondaryAppColor, - error: Colors.red, - ); - - static ThemeData createTheme({ - Brightness brightness, - Color background, - Color primaryText, - Color secondaryText, - Color accentColor, - Color divider, - Color buttonBackground, - Color buttonText, - Color cardBackground, - Color disabled, - Color error, - }) { - final baseTextTheme = brightness == Brightness.dark - ? Typography.blackMountainView - : Typography.whiteMountainView; - - return ThemeData( - brightness: brightness, - canvasColor: background, - cardColor: background, - dividerColor: divider, - dividerTheme: DividerThemeData( - color: divider, - space: 1, - thickness: 1, - ), - cardTheme: CardTheme( - color: cardBackground, - margin: EdgeInsets.zero, - clipBehavior: Clip.antiAliasWithSaveLayer, - ), - elevatedButtonTheme: ElevatedButtonThemeData( - style: ButtonStyle( - shape: MaterialStateProperty.all( - RoundedRectangleBorder( - borderRadius: BorderRadius.circular(18.0), - side: BorderSide(color: Colors.red))), - padding: MaterialStateProperty.all( - const EdgeInsets.all(16)))), - backgroundColor: background, - primaryColor: accentColor, - toggleableActiveColor: accentColor, - appBarTheme: AppBarTheme( - systemOverlayStyle: - SystemUiOverlayStyle(statusBarBrightness: brightness), - color: cardBackground, - iconTheme: IconThemeData( - color: secondaryText, - ), - toolbarTextStyle: TextTheme( - bodyText1: baseTextTheme.bodyText1.copyWith( - color: secondaryText, - fontSize: 18, - ), - ).bodyText2, - titleTextStyle: TextTheme( - bodyText1: baseTextTheme.bodyText1.copyWith( - color: secondaryText, - fontSize: 18, - ), - ).headline6, - ), - iconTheme: IconThemeData( - color: secondaryText, - size: 16.0, - ), - errorColor: error, - buttonTheme: ButtonThemeData( - textTheme: ButtonTextTheme.primary, - colorScheme: ColorScheme( - brightness: brightness, - primary: accentColor, - secondary: accentColor, - surface: background, - background: background, - error: error, - onPrimary: buttonText, - onSecondary: buttonText, - onSurface: buttonText, - onBackground: buttonText, - onError: buttonText, - ), - padding: const EdgeInsets.all(16.0), - ), - cupertinoOverrideTheme: CupertinoThemeData( - brightness: brightness, - primaryColor: accentColor, - ), - inputDecorationTheme: InputDecorationTheme( - errorStyle: TextStyle(color: error), - labelStyle: TextStyle( - fontFamily: '', - fontWeight: FontWeight.w600, - fontSize: 16.0, - color: primaryText.withOpacity(0.5), - ), - hintStyle: TextStyle( - color: secondaryText, - fontSize: 13.0, - fontWeight: FontWeight.w300, - ), - ), - fontFamily: '', - textTheme: TextTheme( - headline1: baseTextTheme.headline1.copyWith( - color: primaryText, - fontSize: 34.0, - fontWeight: FontWeight.bold, - ), - headline2: baseTextTheme.headline2.copyWith( - color: primaryText, - fontSize: 22, - fontWeight: FontWeight.bold, - ), - headline3: baseTextTheme.headline3.copyWith( - color: secondaryText, - fontSize: 20, - fontWeight: FontWeight.w600, - ), - headline4: baseTextTheme.headline4.copyWith( - color: primaryText, - fontSize: 18, - fontWeight: FontWeight.w600, - ), - headline5: baseTextTheme.headline5.copyWith( - color: primaryText, - fontSize: 16, - fontWeight: FontWeight.w700, - ), - headline6: baseTextTheme.headline6.copyWith( - color: primaryText, - fontSize: 14, - fontWeight: FontWeight.w700, - ), - bodyText1: baseTextTheme.bodyText1.copyWith( - color: secondaryText, - fontSize: 15, - ), - bodyText2: baseTextTheme.bodyText2.copyWith( - color: primaryText, - fontSize: 12, - fontWeight: FontWeight.w400, - ), - button: baseTextTheme.button.copyWith( - color: primaryText, - fontSize: 12.0, - fontWeight: FontWeight.w700, - ), - caption: baseTextTheme.caption.copyWith( - color: primaryText, - fontSize: 11.0, - fontWeight: FontWeight.w300, - ), - overline: baseTextTheme.overline.copyWith( - color: secondaryText, - fontSize: 11.0, - fontWeight: FontWeight.w500, - ), - subtitle1: baseTextTheme.subtitle1.copyWith( - color: primaryText, - fontSize: 16.0, - fontWeight: FontWeight.w700, - ), - subtitle2: baseTextTheme.subtitle2.copyWith( - color: secondaryText, - fontSize: 11.0, - fontWeight: FontWeight.w500, - ), - ), - colorScheme: ColorScheme.fromSwatch() - .copyWith(secondary: accentColor, brightness: brightness), - textSelectionTheme: TextSelectionThemeData( - cursorColor: accentColor, - selectionColor: accentColor, - selectionHandleColor: accentColor, - ), - ); - } -} diff --git a/examples/github-repository-list/app/lib/src/routes/index.dart b/examples/github-repository-list/app/lib/src/routes/index.dart deleted file mode 100644 index 5b2647bc..00000000 --- a/examples/github-repository-list/app/lib/src/routes/index.dart +++ /dev/null @@ -1,18 +0,0 @@ -// routes for the app -import 'package:app/src/screens/home/index.dart'; -import 'package:app/src/screens/onboarding/authentication_screen.dart'; -import 'package:app/src/splash_screen.dart'; -import 'package:flutter/material.dart'; - -Route routes(RouteSettings settings) { - switch (settings.name) { - case '/': - return MaterialPageRoute(builder: (_) => SplashScreen()); - case '/home': - return MaterialPageRoute(builder: (_) => HomeScreen()); - case '/auth': - return MaterialPageRoute(builder: (_) => AuthenticationScreen()); - default: - return MaterialPageRoute(builder: (_) => SplashScreen()); - } -} diff --git a/examples/github-repository-list/app/lib/src/screens/home/github_repo_list_screen.dart b/examples/github-repository-list/app/lib/src/screens/home/github_repo_list_screen.dart deleted file mode 100644 index ca405db2..00000000 --- a/examples/github-repository-list/app/lib/src/screens/home/github_repo_list_screen.dart +++ /dev/null @@ -1,56 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:shared/main.dart'; - -class GithubRepoListScreen extends StatefulWidget { - @override - _GithubRepoListScreenState createState() => _GithubRepoListScreenState(); -} - -class _GithubRepoListScreenState extends State { - GithubRepoBloc githubRepoBloc; - @override - Widget build(BuildContext context) { - return BlocBuilder( - bloc: githubRepoBloc, - builder: (BuildContext context, GithubRepoState state) { - if (state is GithubRepoStateLoading) { - return Center( - child: CircularProgressIndicator(), - ); - } - if (state is GithubRepoDataLoadedState) { - return ListView.builder( - shrinkWrap: true, - itemCount: state.repositoryData.length, - itemBuilder: (BuildContext context, int index) { - return Column( - children: [ - ListTile( - title: Text( - state.repositoryData[index].name.toUpperCase(), - style: Theme.of(context).textTheme.bodyText2, - ), - trailing: state.repositoryData[index].viewerHasStarred - ? Icon(Icons.star) - : SizedBox(), - ), - Divider( - height: 10.0, - ) - ], - ); - }, - ); - } - return SizedBox(); - }); - } - - @override - void initState() { - githubRepoBloc = GithubRepoBlocController().authenticationBloc; - githubRepoBloc.add(GithubRepoDataLoadingEvent()); - super.initState(); - } -} diff --git a/examples/github-repository-list/app/lib/src/screens/home/index.dart b/examples/github-repository-list/app/lib/src/screens/home/index.dart deleted file mode 100644 index 3a6dd77e..00000000 --- a/examples/github-repository-list/app/lib/src/screens/home/index.dart +++ /dev/null @@ -1,114 +0,0 @@ -// home screen contents -import 'package:app/src/config/image_constants.dart'; -import 'package:app/src/config/string_constants.dart' as string_constants; -import 'package:app/src/screens/home/github_repo_list_screen.dart'; -import 'package:app/src/utils/app_state_notifier.dart'; -import 'package:app/src/widgets/cache_image_widget.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:provider/provider.dart'; -import 'package:shared/main.dart'; - -class HomeScreen extends StatelessWidget { - // ignore: close_sinks - final AuthenticationBloc authenticationBloc = - AuthenticationBlocController().authenticationBloc; - - @override - Widget build(BuildContext context) { - authenticationBloc.add(GetUserData()); - return WillPopScope( - onWillPop: () async => false, - child: BlocBuilder( - bloc: authenticationBloc, - builder: (BuildContext context, AuthenticationState state) { - if (state is SetUserData) { - return Scaffold( - appBar: AppBar( - centerTitle: true, - title: Text( - string_constants.app_bar_title, - style: Theme.of(context).appBarTheme.textTheme.bodyText1, - ), - actions: [ - IconButton( - icon: Icon(Icons.logout), - onPressed: () { - authenticationBloc.add(UserLogOut()); - }), - ], - ), - body: GithubRepoListScreen(), - drawer: Drawer( - child: ListView( - padding: EdgeInsets.zero, - children: [ - DrawerHeader( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(50), - color: Colors.white), - child: CachedImage( - imageUrl: - state.currentUserData.data.avatar, - fit: BoxFit.fitWidth, - errorWidget: Image.network( - AllImages().kDefaultImage, - ), - width: 80, - height: 80, - placeholder: CircularProgressIndicator(), - ), - ), - Switch( - value: - Provider.of(context) - .isDarkMode, - onChanged: (value) { - Provider.of(context, - listen: false) - .updateTheme(value); - }, - ), - ], - ) - ], - ), - decoration: BoxDecoration( - color: Theme.of(context).dividerColor, - ), - ), - ListTile( - title: Text( - '${state.currentUserData.data.firstName} ${state.currentUserData.data.lastName}', - style: Theme.of(context).textTheme.bodyText2), - ), - ListTile( - title: Text(state.currentUserData.data.email, - style: Theme.of(context).textTheme.bodyText2), - ), - ListTile( - title: Text(state.currentUserData.ad.company, - style: Theme.of(context).textTheme.bodyText2), - ), - ], - ), - ), - ); - } - return Scaffold( - body: Center( - child: CircularProgressIndicator(), - ), - ); - })); - } -} diff --git a/examples/github-repository-list/app/lib/src/screens/onboarding/authentication_screen.dart b/examples/github-repository-list/app/lib/src/screens/onboarding/authentication_screen.dart deleted file mode 100644 index 77326694..00000000 --- a/examples/github-repository-list/app/lib/src/screens/onboarding/authentication_screen.dart +++ /dev/null @@ -1,129 +0,0 @@ -import 'package:app/src/screens/onboarding/login_screen.dart'; -import 'package:app/src/screens/onboarding/signup_screen.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:shared/main.dart'; - -class AuthenticationScreen extends StatefulWidget { - @override - _AuthenticationScreenState createState() => _AuthenticationScreenState(); -} - -class _AuthenticationScreenState extends State { - bool showLoginForm = false; - // ignore: close_sinks - AuthenticationBloc authenticationBloc; - @override - Widget build(BuildContext context) { - void _showError(String error) async { - await Fluttertoast.showToast( - msg: error, - toastLength: Toast.LENGTH_SHORT, - gravity: ToastGravity.BOTTOM, - timeInSecForIosWeb: 3, - backgroundColor: Colors.red, - textColor: Colors.white, - fontSize: 16.0); - } - - return Scaffold( - body: WillPopScope( - onWillPop: () async => false, - child: BlocListener( - bloc: authenticationBloc, - listener: (context, state) { - if (state is AuthenticationFailure) { - _showError(state.message); - } - }, - child: BlocBuilder( - bloc: authenticationBloc, - builder: (BuildContext context, AuthenticationState state) { - return SafeArea( - child: Stack( - children: [ - Center( - child: ListView( - shrinkWrap: true, - children: [ - Center( - child: Text( - showLoginForm ? 'LOGIN' : 'SIGN UP', - style: Theme.of(context).textTheme.headline2, - )), - Padding( - padding: const EdgeInsets.all(32.0), - child: showLoginForm - ? LoginForm( - authenticationBloc: authenticationBloc, - state: state, - ) - : SignUpForm( - authenticationBloc: authenticationBloc, - state: state, - ), - ), - showLoginForm - ? SizedBox() - : Padding( - padding: const EdgeInsets.all(32.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - SizedBox( - height: 38, - ), - Text('Already have an account?'), - SizedBox( - height: 8, - ), - ElevatedButton( - child: Text( - 'Login', - style: Theme.of(context) - .textTheme - .bodyText1, - ), - onPressed: () { - setState(() { - showLoginForm = true; - }); - }) - ], - ), - ) - ], - ), - ), - !showLoginForm - ? SizedBox() - : Positioned( - left: 6, - child: IconButton( - icon: Icon( - Icons.arrow_back_ios, - size: 32, - color: Theme.of(context).primaryColor, - ), - onPressed: () { - setState(() { - showLoginForm = false; - }); - }, - ), - ) - ], - ), - ); - }), - ), - )); - } - - @override - void initState() { - authenticationBloc = AuthenticationBlocController().authenticationBloc; - super.initState(); - } -} diff --git a/examples/github-repository-list/app/lib/src/screens/onboarding/login_screen.dart b/examples/github-repository-list/app/lib/src/screens/onboarding/login_screen.dart deleted file mode 100644 index d7a8d57b..00000000 --- a/examples/github-repository-list/app/lib/src/screens/onboarding/login_screen.dart +++ /dev/null @@ -1,79 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:shared/main.dart'; - -class LoginForm extends StatefulWidget { - final AuthenticationBloc authenticationBloc; - final AuthenticationState state; - LoginForm({this.authenticationBloc, this.state}); - @override - _LoginFormState createState() => _LoginFormState(); -} - -class _LoginFormState extends State { - final GlobalKey _key = GlobalKey(); - final _passwordController = TextEditingController(); - final _emailController = TextEditingController(); - - @override - Widget build(BuildContext context) { - return Form( - key: _key, - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - TextFormField( - decoration: InputDecoration( - labelText: 'Email address', - filled: true, - isDense: true, - ), - controller: _emailController, - keyboardType: TextInputType.emailAddress, - autocorrect: false, - validator: (value) { - if (value.isEmpty) { - return 'Email is required.'; - } - return null; - }, - ), - SizedBox( - height: 12, - ), - TextFormField( - decoration: InputDecoration( - labelText: 'Password', - filled: true, - isDense: true, - ), - obscureText: true, - controller: _passwordController, - validator: (value) { - if (value.isEmpty) { - return 'Password is required.'; - } - return null; - }, - ), - const SizedBox( - height: 16, - ), - ElevatedButton( - child: widget.state is AuthenticationLoading - ? CircularProgressIndicator( - backgroundColor: - Theme.of(context).textTheme.bodyText1.color, - ) - : Text('Login', style: Theme.of(context).textTheme.bodyText1), - onPressed: () { - if (_key.currentState.validate()) { - widget.authenticationBloc.add(UserLogin( - email: _emailController.text, - password: _passwordController.text)); - } else {} - }) - ], - ), - ); - } -} diff --git a/examples/github-repository-list/app/lib/src/screens/onboarding/signup_screen.dart b/examples/github-repository-list/app/lib/src/screens/onboarding/signup_screen.dart deleted file mode 100644 index 03eaad47..00000000 --- a/examples/github-repository-list/app/lib/src/screens/onboarding/signup_screen.dart +++ /dev/null @@ -1,84 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:shared/main.dart'; - -class SignUpForm extends StatefulWidget { - final AuthenticationBloc authenticationBloc; - final AuthenticationState state; - SignUpForm({this.authenticationBloc, this.state}); - @override - _SignUpFormState createState() => _SignUpFormState(); -} - -class _SignUpFormState extends State { - final GlobalKey _key = GlobalKey(); - final _passwordController = TextEditingController(); - final _emailController = TextEditingController(); - - @override - Widget build(BuildContext context) { - return Form( - key: _key, - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - TextFormField( - decoration: InputDecoration( - labelText: 'Email address', - filled: true, - isDense: true, - ), - controller: _emailController, - keyboardType: TextInputType.emailAddress, - autocorrect: false, - validator: (value) { - if (value.isEmpty) { - return 'Email is required.'; - } - return null; - }, - ), - SizedBox( - height: 12, - ), - TextFormField( - decoration: InputDecoration( - labelText: 'Password', - filled: true, - isDense: true, - ), - obscureText: true, - controller: _passwordController, - validator: (value) { - if (value.isEmpty) { - return 'Password is required.'; - } - return null; - }, - ), - const SizedBox( - height: 16, - ), - ElevatedButton( - child: widget.state is AuthenticationLoading - ? CircularProgressIndicator( - backgroundColor: - Theme.of(context).textTheme.bodyText1.color, - ) - : Text( - 'Sign Up', - style: Theme.of(context).textTheme.bodyText1, - ), - onPressed: () { - if (_key.currentState.validate()) { - widget.authenticationBloc.add(UserSignUp( - email: _emailController.text, - password: _passwordController.text)); - } else { - print('Form not validated'); - } - }) - ], - ), - ); - } -} diff --git a/examples/github-repository-list/app/lib/src/splash_screen.dart b/examples/github-repository-list/app/lib/src/splash_screen.dart deleted file mode 100644 index 83deeca2..00000000 --- a/examples/github-repository-list/app/lib/src/splash_screen.dart +++ /dev/null @@ -1,45 +0,0 @@ -import 'package:app/src/config/color_constants.dart'; -import 'package:app/src/config/image_constants.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:shared/main.dart'; - -class SplashScreen extends StatefulWidget { - @override - _SplashScreenState createState() => _SplashScreenState(); -} - -class _SplashScreenState extends State { - AuthenticationBloc authenticationBloc; - @override - Widget build(BuildContext context) { - return Scaffold( - backgroundColor: ColorConstants.secondaryAppColor, - body: BlocListener( - bloc: authenticationBloc, - listener: (BuildContext context, AuthenticationState state) { - if (state is AppAutheticated) { - Navigator.pushNamed(context, '/home'); - } - if (state is AuthenticationStart) { - Navigator.pushNamed(context, '/auth'); - } - if (state is UserLogoutState) { - Navigator.pushNamed(context, '/auth'); - } - }, - child: BlocBuilder( - bloc: authenticationBloc, - builder: (BuildContext context, AuthenticationState state) { - return Center(child: Image.asset(AllImages().logo)); - }), - )); - } - - @override - void initState() { - authenticationBloc = AuthenticationBlocController().authenticationBloc; - authenticationBloc.add(AppLoadedup()); - super.initState(); - } -} diff --git a/examples/github-repository-list/app/lib/src/utils/app_state_notifier.dart b/examples/github-repository-list/app/lib/src/utils/app_state_notifier.dart deleted file mode 100644 index 1ddc68ec..00000000 --- a/examples/github-repository-list/app/lib/src/utils/app_state_notifier.dart +++ /dev/null @@ -1,10 +0,0 @@ -import 'package:flutter/material.dart'; - -class AppStateNotifier extends ChangeNotifier { - bool isDarkMode = false; - - void updateTheme(bool isDarkMode) { - this.isDarkMode = isDarkMode; - notifyListeners(); - } -} diff --git a/examples/github-repository-list/app/lib/src/utils/size_utils.dart b/examples/github-repository-list/app/lib/src/utils/size_utils.dart deleted file mode 100644 index b46a5fc1..00000000 --- a/examples/github-repository-list/app/lib/src/utils/size_utils.dart +++ /dev/null @@ -1,81 +0,0 @@ -import 'package:flutter/material.dart'; - -class SizeConfig { - SizeConfig._(); - static SizeConfig _instance = SizeConfig._(); - factory SizeConfig() => _instance; - - MediaQueryData _mediaQueryData; - double screenWidth; - double screenHeight; - double blockSizeHorizontal; - double blockSizeVertical; - double _safeAreaHorizontal; - double _safeAreaVertical; - double safeBlockHorizontal; - double safeBlockVertical; - double profileDrawerWidth; - double refHeight; - double refWidth; - - void init(BuildContext context) { - _mediaQueryData = MediaQuery.of(context); - screenWidth = _mediaQueryData.size.width; - screenHeight = _mediaQueryData.size.height; - refHeight = 1450; - refWidth = 670; - - if (screenHeight < 1200) { - blockSizeHorizontal = screenWidth / 100; - blockSizeVertical = screenHeight / 100; - - _safeAreaHorizontal = - _mediaQueryData.padding.left + _mediaQueryData.padding.right; - _safeAreaVertical = - _mediaQueryData.padding.top + _mediaQueryData.padding.bottom; - safeBlockHorizontal = (screenWidth - _safeAreaHorizontal) / 100; - safeBlockVertical = (screenHeight - _safeAreaVertical) / 100; - } else { - blockSizeHorizontal = screenWidth / 120; - blockSizeVertical = screenHeight / 120; - - _safeAreaHorizontal = - _mediaQueryData.padding.left + _mediaQueryData.padding.right; - _safeAreaVertical = - _mediaQueryData.padding.top + _mediaQueryData.padding.bottom; - safeBlockHorizontal = (screenWidth - _safeAreaHorizontal) / 120; - safeBlockVertical = (screenHeight - _safeAreaVertical) / 120; - } - } - - double getWidthRatio(double val) { - double res = (val / refWidth) * 100; - double temp = res * blockSizeHorizontal; - - return temp; - } - - double getHeightRatio(double val) { - double res = (val / refHeight) * 100; - double temp = res * blockSizeVertical; - return temp; - } - - double getFontRatio(double val) { - double res = (val / refWidth) * 100; - double temp = 0.0; - if (screenWidth < screenHeight) { - temp = res * safeBlockHorizontal; - } else { - temp = res * safeBlockVertical; - } - - return temp; - } -} - -extension SizeUtils on num { - double get toWidth => SizeConfig().getWidthRatio(this.toDouble()); - double get toHeight => SizeConfig().getHeightRatio(this.toDouble()); - double get toFont => SizeConfig().getFontRatio(this.toDouble()); -} diff --git a/examples/github-repository-list/app/lib/src/widgets/cache_image_widget.dart b/examples/github-repository-list/app/lib/src/widgets/cache_image_widget.dart deleted file mode 100644 index 022f17d1..00000000 --- a/examples/github-repository-list/app/lib/src/widgets/cache_image_widget.dart +++ /dev/null @@ -1,35 +0,0 @@ -import 'package:cached_network_image/cached_network_image.dart'; -import 'package:flutter/material.dart'; - -class CachedImage extends StatelessWidget { - CachedImage({ - Key key, - @required this.imageUrl, - this.fit = BoxFit.cover, - this.height, - this.width, - this.placeholder, - this.errorWidget, - }) : assert(imageUrl != null), - super(key: key); - - final String imageUrl; - final BoxFit fit; - final double height; - final double width; - final Widget placeholder; - final Widget errorWidget; - - @override - Widget build(BuildContext context) { - return CachedNetworkImage( - imageUrl: imageUrl, - fit: fit, - height: height, - width: width, - placeholder: (context, url) => placeholder ?? CircularProgressIndicator(), - errorWidget: (context, url, err) => - errorWidget ?? Icon(Icons.error_outline), - ); - } -} diff --git a/examples/github-repository-list/app/linux/.gitignore b/examples/github-repository-list/app/linux/.gitignore deleted file mode 100644 index d3896c98..00000000 --- a/examples/github-repository-list/app/linux/.gitignore +++ /dev/null @@ -1 +0,0 @@ -flutter/ephemeral diff --git a/examples/github-repository-list/app/linux/CMakeLists.txt b/examples/github-repository-list/app/linux/CMakeLists.txt deleted file mode 100644 index 5c553c66..00000000 --- a/examples/github-repository-list/app/linux/CMakeLists.txt +++ /dev/null @@ -1,116 +0,0 @@ -cmake_minimum_required(VERSION 3.10) -project(runner LANGUAGES CXX) - -set(BINARY_NAME "app") -set(APPLICATION_ID "com.example.app") - -cmake_policy(SET CMP0063 NEW) - -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() - -# Configure build 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. -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() - -set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") - -# Flutter library and tool build rules. -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}") - -# Application build -add_executable(${BINARY_NAME} - "main.cc" - "my_application.cc" - "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" -) -apply_standard_settings(${BINARY_NAME}) -target_link_libraries(${BINARY_NAME} PRIVATE flutter) -target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) -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) - -if(PLUGIN_BUNDLED_LIBRARIES) - install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) -endif() - -# 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/examples/github-repository-list/app/linux/flutter/generated_plugin_registrant.h b/examples/github-repository-list/app/linux/flutter/generated_plugin_registrant.h deleted file mode 100644 index e0f0a47b..00000000 --- a/examples/github-repository-list/app/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/examples/github-repository-list/app/linux/flutter/generated_plugins.cmake b/examples/github-repository-list/app/linux/flutter/generated_plugins.cmake deleted file mode 100644 index 51436ae8..00000000 --- a/examples/github-repository-list/app/linux/flutter/generated_plugins.cmake +++ /dev/null @@ -1,15 +0,0 @@ -# -# Generated file, do not edit. -# - -list(APPEND FLUTTER_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) diff --git a/examples/github-repository-list/app/linux/main.cc b/examples/github-repository-list/app/linux/main.cc deleted file mode 100644 index e7c5c543..00000000 --- a/examples/github-repository-list/app/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/examples/github-repository-list/app/linux/my_application.cc b/examples/github-repository-list/app/linux/my_application.cc deleted file mode 100644 index 42d9b08a..00000000 --- a/examples/github-repository-list/app/linux/my_application.cc +++ /dev/null @@ -1,104 +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, "app"); - 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, "app"); - } - - 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 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_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/examples/github-repository-list/app/linux/my_application.h b/examples/github-repository-list/app/linux/my_application.h deleted file mode 100644 index 72271d5e..00000000 --- a/examples/github-repository-list/app/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/examples/github-repository-list/app/macos/.gitignore b/examples/github-repository-list/app/macos/.gitignore deleted file mode 100644 index 746adbb6..00000000 --- a/examples/github-repository-list/app/macos/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -# Flutter-related -**/Flutter/ephemeral/ -**/Pods/ - -# Xcode-related -**/dgph -**/xcuserdata/ diff --git a/examples/github-repository-list/app/macos/Flutter/Flutter-Debug.xcconfig b/examples/github-repository-list/app/macos/Flutter/Flutter-Debug.xcconfig deleted file mode 100644 index c2efd0b6..00000000 --- a/examples/github-repository-list/app/macos/Flutter/Flutter-Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/examples/github-repository-list/app/macos/Flutter/Flutter-Release.xcconfig b/examples/github-repository-list/app/macos/Flutter/Flutter-Release.xcconfig deleted file mode 100644 index c2efd0b6..00000000 --- a/examples/github-repository-list/app/macos/Flutter/Flutter-Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/examples/github-repository-list/app/macos/Runner.xcodeproj/project.pbxproj b/examples/github-repository-list/app/macos/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index 87088f13..00000000 --- a/examples/github-repository-list/app/macos/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,572 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 51; - 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 */ - 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 */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 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 */ - 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 /* app.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "app.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 = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 33CC10EA2044A3C60003C045 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 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 */, - 33CC10EE2044A3C60003C045 /* Products */, - D73912EC22F37F3D000D13A0 /* Frameworks */, - ); - sourceTree = ""; - }; - 33CC10EE2044A3C60003C045 /* Products */ = { - isa = PBXGroup; - children = ( - 33CC10ED2044A3C60003C045 /* app.app */, - ); - 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 = ""; - }; - D73912EC22F37F3D000D13A0 /* Frameworks */ = { - isa = PBXGroup; - children = ( - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 33CC10EC2044A3C60003C045 /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 33CC10E92044A3C60003C045 /* Sources */, - 33CC10EA2044A3C60003C045 /* Frameworks */, - 33CC10EB2044A3C60003C045 /* Resources */, - 33CC110E2044A8840003C045 /* Bundle Framework */, - 3399D490228B24CF009A79C7 /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - 33CC11202044C79F0003C045 /* PBXTargetDependency */, - ); - name = Runner; - productName = Runner; - productReference = 33CC10ED2044A3C60003C045 /* app.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 33CC10E52044A3C60003C045 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1300; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 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 */, - 33CC111A2044C6BA0003C045 /* Flutter Assemble */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 33CC10EB2044A3C60003C045 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, - 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3399D490228B24CF009A79C7 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - 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"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 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 */ - 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 */ - 338D0CE9231458BD00FA5F75 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - 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; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - 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.11; - 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", - ); - 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; - 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; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - 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.11; - 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; - 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; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - 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.11; - 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", - ); - 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", - ); - 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 */ - 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/examples/github-repository-list/app/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/github-repository-list/app/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/examples/github-repository-list/app/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/github-repository-list/app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/examples/github-repository-list/app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index 2aba2321..00000000 --- a/examples/github-repository-list/app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/github-repository-list/app/macos/Runner.xcworkspace/contents.xcworkspacedata b/examples/github-repository-list/app/macos/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16..00000000 --- a/examples/github-repository-list/app/macos/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/examples/github-repository-list/app/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/github-repository-list/app/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/examples/github-repository-list/app/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/github-repository-list/app/macos/Runner/AppDelegate.swift b/examples/github-repository-list/app/macos/Runner/AppDelegate.swift deleted file mode 100644 index d53ef643..00000000 --- a/examples/github-repository-list/app/macos/Runner/AppDelegate.swift +++ /dev/null @@ -1,9 +0,0 @@ -import Cocoa -import FlutterMacOS - -@NSApplicationMain -class AppDelegate: FlutterAppDelegate { - override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { - return true - } -} diff --git a/examples/github-repository-list/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/github-repository-list/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index a2ec33f1..00000000 --- a/examples/github-repository-list/app/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/examples/github-repository-list/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/examples/github-repository-list/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png deleted file mode 100644 index 3c4935a7..00000000 Binary files a/examples/github-repository-list/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png and /dev/null differ diff --git a/examples/github-repository-list/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/examples/github-repository-list/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png deleted file mode 100644 index ed4cc164..00000000 Binary files a/examples/github-repository-list/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png and /dev/null differ diff --git a/examples/github-repository-list/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/examples/github-repository-list/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png deleted file mode 100644 index 483be613..00000000 Binary files a/examples/github-repository-list/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png and /dev/null differ diff --git a/examples/github-repository-list/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/examples/github-repository-list/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png deleted file mode 100644 index bcbf36df..00000000 Binary files a/examples/github-repository-list/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png and /dev/null differ diff --git a/examples/github-repository-list/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/examples/github-repository-list/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png deleted file mode 100644 index 9c0a6528..00000000 Binary files a/examples/github-repository-list/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png and /dev/null differ diff --git a/examples/github-repository-list/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/examples/github-repository-list/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png deleted file mode 100644 index e71a7261..00000000 Binary files a/examples/github-repository-list/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png and /dev/null differ diff --git a/examples/github-repository-list/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/examples/github-repository-list/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png deleted file mode 100644 index 8a31fe2d..00000000 Binary files a/examples/github-repository-list/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png and /dev/null differ diff --git a/examples/github-repository-list/app/macos/Runner/Base.lproj/MainMenu.xib b/examples/github-repository-list/app/macos/Runner/Base.lproj/MainMenu.xib deleted file mode 100644 index 80e867a4..00000000 --- a/examples/github-repository-list/app/macos/Runner/Base.lproj/MainMenu.xib +++ /dev/null @@ -1,343 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/github-repository-list/app/macos/Runner/Configs/AppInfo.xcconfig b/examples/github-repository-list/app/macos/Runner/Configs/AppInfo.xcconfig deleted file mode 100644 index 11e3faa7..00000000 --- a/examples/github-repository-list/app/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 = app - -// The application's bundle identifier -PRODUCT_BUNDLE_IDENTIFIER = com.example.app - -// The copyright displayed in application information -PRODUCT_COPYRIGHT = Copyright © 2022 com.example. All rights reserved. diff --git a/examples/github-repository-list/app/macos/Runner/Configs/Debug.xcconfig b/examples/github-repository-list/app/macos/Runner/Configs/Debug.xcconfig deleted file mode 100644 index 36b0fd94..00000000 --- a/examples/github-repository-list/app/macos/Runner/Configs/Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "../../Flutter/Flutter-Debug.xcconfig" -#include "Warnings.xcconfig" diff --git a/examples/github-repository-list/app/macos/Runner/Configs/Release.xcconfig b/examples/github-repository-list/app/macos/Runner/Configs/Release.xcconfig deleted file mode 100644 index dff4f495..00000000 --- a/examples/github-repository-list/app/macos/Runner/Configs/Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "../../Flutter/Flutter-Release.xcconfig" -#include "Warnings.xcconfig" diff --git a/examples/github-repository-list/app/macos/Runner/Configs/Warnings.xcconfig b/examples/github-repository-list/app/macos/Runner/Configs/Warnings.xcconfig deleted file mode 100644 index 42bcbf47..00000000 --- a/examples/github-repository-list/app/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/examples/github-repository-list/app/macos/Runner/DebugProfile.entitlements b/examples/github-repository-list/app/macos/Runner/DebugProfile.entitlements deleted file mode 100644 index dddb8a30..00000000 --- a/examples/github-repository-list/app/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/examples/github-repository-list/app/macos/Runner/Info.plist b/examples/github-repository-list/app/macos/Runner/Info.plist deleted file mode 100644 index 4789daa6..00000000 --- a/examples/github-repository-list/app/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/examples/github-repository-list/app/macos/Runner/MainFlutterWindow.swift b/examples/github-repository-list/app/macos/Runner/MainFlutterWindow.swift deleted file mode 100644 index 2722837e..00000000 --- a/examples/github-repository-list/app/macos/Runner/MainFlutterWindow.swift +++ /dev/null @@ -1,15 +0,0 @@ -import Cocoa -import FlutterMacOS - -class MainFlutterWindow: NSWindow { - override func awakeFromNib() { - let flutterViewController = FlutterViewController.init() - let windowFrame = self.frame - self.contentViewController = flutterViewController - self.setFrame(windowFrame, display: true) - - RegisterGeneratedPlugins(registry: flutterViewController) - - super.awakeFromNib() - } -} diff --git a/examples/github-repository-list/app/macos/Runner/Release.entitlements b/examples/github-repository-list/app/macos/Runner/Release.entitlements deleted file mode 100644 index 852fa1a4..00000000 --- a/examples/github-repository-list/app/macos/Runner/Release.entitlements +++ /dev/null @@ -1,8 +0,0 @@ - - - - - com.apple.security.app-sandbox - - - diff --git a/examples/github-repository-list/app/pubspec.lock b/examples/github-repository-list/app/pubspec.lock deleted file mode 100644 index 70b68280..00000000 --- a/examples/github-repository-list/app/pubspec.lock +++ /dev/null @@ -1,726 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - api_sdk: - dependency: transitive - description: - path: "../api_sdk" - relative: true - source: path - version: "1.0.0+1" - archive: - dependency: transitive - description: - name: archive - url: "https://pub.dartlang.org" - source: hosted - version: "3.2.2" - args: - dependency: transitive - description: - name: args - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.0" - async: - dependency: transitive - description: - name: async - url: "https://pub.dartlang.org" - source: hosted - version: "2.8.2" - bloc: - dependency: "direct main" - description: - name: bloc - url: "https://pub.dartlang.org" - source: hosted - version: "8.0.3" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - cached_network_image: - dependency: "direct main" - description: - name: cached_network_image - url: "https://pub.dartlang.org" - source: hosted - version: "3.2.0" - cached_network_image_platform_interface: - dependency: transitive - description: - name: cached_network_image_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - cached_network_image_web: - dependency: transitive - description: - name: cached_network_image_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - characters: - dependency: transitive - description: - name: characters - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - clock: - dependency: transitive - description: - name: clock - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - collection: - dependency: transitive - description: - name: collection - url: "https://pub.dartlang.org" - source: hosted - version: "1.15.0" - connectivity_plus: - dependency: transitive - description: - name: connectivity_plus - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.1" - connectivity_plus_linux: - dependency: transitive - description: - name: connectivity_plus_linux - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - connectivity_plus_macos: - dependency: transitive - description: - name: connectivity_plus_macos - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.1" - connectivity_plus_platform_interface: - dependency: transitive - description: - name: connectivity_plus_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_web: - dependency: transitive - description: - name: connectivity_plus_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_windows: - dependency: transitive - description: - name: connectivity_plus_windows - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - crypto: - dependency: transitive - description: - name: crypto - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.4" - dbus: - dependency: transitive - description: - name: dbus - url: "https://pub.dartlang.org" - source: hosted - version: "0.7.1" - equatable: - dependency: "direct main" - description: - name: equatable - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - fake_async: - dependency: transitive - description: - name: fake_async - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - ffi: - dependency: transitive - description: - name: ffi - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.2" - file: - dependency: transitive - description: - name: file - url: "https://pub.dartlang.org" - source: hosted - version: "6.1.2" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_bloc: - dependency: "direct main" - description: - name: flutter_bloc - url: "https://pub.dartlang.org" - source: hosted - version: "8.0.1" - flutter_blurhash: - dependency: transitive - description: - name: flutter_blurhash - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.4" - flutter_cache_manager: - dependency: transitive - description: - name: flutter_cache_manager - url: "https://pub.dartlang.org" - source: hosted - version: "3.3.0" - flutter_native_splash: - dependency: "direct dev" - description: - name: flutter_native_splash - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - fluttertoast: - dependency: "direct main" - description: - name: fluttertoast - url: "https://pub.dartlang.org" - source: hosted - version: "8.0.9" - freezed_annotation: - dependency: transitive - description: - name: freezed_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - gql: - dependency: transitive - description: - name: gql - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.0" - gql_dedupe_link: - dependency: transitive - description: - name: gql_dedupe_link - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - gql_error_link: - dependency: transitive - description: - name: gql_error_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - gql_exec: - dependency: transitive - description: - name: gql_exec - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.0" - gql_http_link: - dependency: transitive - description: - name: gql_http_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.0" - gql_link: - dependency: transitive - description: - name: gql_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.0" - gql_transform_link: - dependency: transitive - description: - name: gql_transform_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - graphql: - dependency: transitive - description: - name: graphql - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.1" - graphql_flutter: - dependency: transitive - description: - name: graphql_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.1" - hive: - dependency: transitive - description: - name: hive - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - http: - dependency: transitive - description: - name: http - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.4" - http_parser: - dependency: transitive - description: - name: http_parser - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.0" - image: - dependency: transitive - description: - name: image - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.3" - js: - dependency: transitive - description: - name: js - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.3" - json_annotation: - dependency: transitive - description: - name: json_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "4.4.0" - matcher: - dependency: transitive - description: - name: matcher - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.11" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.3" - meta: - dependency: "direct main" - description: - name: meta - url: "https://pub.dartlang.org" - source: hosted - version: "1.7.0" - nested: - dependency: transitive - description: - name: nested - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - nm: - dependency: transitive - description: - name: nm - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.0" - normalize: - dependency: transitive - description: - name: normalize - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.0+1" - octo_image: - dependency: transitive - description: - name: octo_image - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - path: - dependency: transitive - description: - name: path - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0" - path_provider: - dependency: transitive - description: - name: path_provider - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.9" - path_provider_android: - dependency: transitive - description: - name: path_provider_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.12" - path_provider_ios: - dependency: transitive - description: - name: path_provider_ios - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.8" - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.5" - path_provider_macos: - dependency: transitive - description: - name: path_provider_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.dartlang.org" - source: hosted - version: "1.11.1" - petitparser: - dependency: transitive - description: - name: petitparser - url: "https://pub.dartlang.org" - source: hosted - version: "4.4.0" - platform: - dependency: transitive - description: - name: platform - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.2" - process: - dependency: transitive - description: - name: process - url: "https://pub.dartlang.org" - source: hosted - version: "4.2.4" - provider: - dependency: "direct main" - description: - name: provider - url: "https://pub.dartlang.org" - source: hosted - version: "6.0.2" - rxdart: - dependency: transitive - description: - name: rxdart - url: "https://pub.dartlang.org" - source: hosted - version: "0.27.3" - shared: - dependency: "direct main" - description: - path: "../shared" - relative: true - source: path - version: "1.0.0+1" - shared_preferences: - dependency: transitive - description: - name: shared_preferences - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.13" - shared_preferences_android: - dependency: transitive - description: - name: shared_preferences_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.11" - shared_preferences_ios: - dependency: transitive - description: - name: shared_preferences_ios - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - shared_preferences_linux: - dependency: transitive - description: - name: shared_preferences_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - shared_preferences_macos: - dependency: transitive - description: - name: shared_preferences_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - shared_preferences_platform_interface: - dependency: transitive - description: - name: shared_preferences_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - shared_preferences_web: - dependency: transitive - description: - name: shared_preferences_web - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - shared_preferences_windows: - dependency: transitive - description: - name: shared_preferences_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_span: - dependency: transitive - description: - name: source_span - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.1" - sqflite: - dependency: transitive - description: - name: sqflite - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.2" - sqflite_common: - dependency: transitive - description: - name: sqflite_common - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.1" - stack_trace: - dependency: transitive - description: - name: stack_trace - url: "https://pub.dartlang.org" - source: hosted - version: "1.10.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - synchronized: - dependency: transitive - description: - name: synchronized - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - test_api: - dependency: transitive - description: - name: test_api - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.8" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - universal_io: - dependency: transitive - description: - name: universal_io - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.4" - uuid: - dependency: transitive - description: - name: uuid - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.6" - vector_math: - dependency: transitive - description: - name: vector_math - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - webview_flutter: - dependency: "direct main" - description: - name: webview_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - webview_flutter_android: - dependency: transitive - description: - name: webview_flutter_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.8.3" - webview_flutter_platform_interface: - dependency: transitive - description: - name: webview_flutter_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.1" - webview_flutter_wkwebview: - dependency: transitive - description: - name: webview_flutter_wkwebview - url: "https://pub.dartlang.org" - source: hosted - version: "2.7.1" - win32: - dependency: transitive - description: - name: win32 - url: "https://pub.dartlang.org" - source: hosted - version: "2.4.2" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0+1" - xml: - dependency: transitive - description: - name: xml - url: "https://pub.dartlang.org" - source: hosted - version: "5.3.1" - yaml: - dependency: transitive - description: - name: yaml - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" -sdks: - dart: ">=2.16.0 <3.0.0" - flutter: ">=2.8.0" diff --git a/examples/github-repository-list/app/pubspec.yaml b/examples/github-repository-list/app/pubspec.yaml deleted file mode 100644 index 92c38757..00000000 --- a/examples/github-repository-list/app/pubspec.yaml +++ /dev/null @@ -1,94 +0,0 @@ -name: app -description: A new Flutter project. - -# The following line prevents the package from being accidentally published to -# pub.dev using `flutter pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev - -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.0+1 - -environment: - sdk: ">=2.7.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.0 - provider: - webview_flutter: ^3.0.1 - flutter_bloc: ^8.0.1 - meta: ^1.1.6 - bloc: ^8.0.3 - equatable: ^2.0.3 - fluttertoast: ^8.0.9 - cached_network_image: ^3.2.0 - shared: - path: ../shared -dev_dependencies: - flutter_test: - sdk: flutter - flutter_native_splash: ^2.1.1 - -flutter_native_splash: - image: assets/images/logo.png - color: "5E92F3" - android_disable_fullscreen: true - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter. -flutter: - - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. - uses-material-design: true - - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - assets: - - assets/images/logo.png - - assets/images/2.0x/logo.png - - assets/images/3.0x/logo.png - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware. - - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/assets-and-images/#from-packages - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/custom-fonts/#from-packages diff --git a/examples/github-repository-list/app/web/favicon.png b/examples/github-repository-list/app/web/favicon.png deleted file mode 100644 index 8aaa46ac..00000000 Binary files a/examples/github-repository-list/app/web/favicon.png and /dev/null differ diff --git a/examples/github-repository-list/app/web/icons/Icon-192.png b/examples/github-repository-list/app/web/icons/Icon-192.png deleted file mode 100644 index b749bfef..00000000 Binary files a/examples/github-repository-list/app/web/icons/Icon-192.png and /dev/null differ diff --git a/examples/github-repository-list/app/web/icons/Icon-512.png b/examples/github-repository-list/app/web/icons/Icon-512.png deleted file mode 100644 index 88cfd48d..00000000 Binary files a/examples/github-repository-list/app/web/icons/Icon-512.png and /dev/null differ diff --git a/examples/github-repository-list/app/web/icons/Icon-maskable-192.png b/examples/github-repository-list/app/web/icons/Icon-maskable-192.png deleted file mode 100644 index eb9b4d76..00000000 Binary files a/examples/github-repository-list/app/web/icons/Icon-maskable-192.png and /dev/null differ diff --git a/examples/github-repository-list/app/web/icons/Icon-maskable-512.png b/examples/github-repository-list/app/web/icons/Icon-maskable-512.png deleted file mode 100644 index d69c5669..00000000 Binary files a/examples/github-repository-list/app/web/icons/Icon-maskable-512.png and /dev/null differ diff --git a/examples/github-repository-list/app/web/index.html b/examples/github-repository-list/app/web/index.html deleted file mode 100644 index 9a16f36c..00000000 --- a/examples/github-repository-list/app/web/index.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - app - - - - - - - diff --git a/examples/github-repository-list/app/web/manifest.json b/examples/github-repository-list/app/web/manifest.json deleted file mode 100644 index 5620a335..00000000 --- a/examples/github-repository-list/app/web/manifest.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "app", - "short_name": "app", - "start_url": ".", - "display": "standalone", - "background_color": "#0175C2", - "theme_color": "#0175C2", - "description": "A new Flutter project.", - "orientation": "portrait-primary", - "prefer_related_applications": false, - "icons": [ - { - "src": "icons/Icon-192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "icons/Icon-512.png", - "sizes": "512x512", - "type": "image/png" - }, - { - "src": "icons/Icon-maskable-192.png", - "sizes": "192x192", - "type": "image/png", - "purpose": "maskable" - }, - { - "src": "icons/Icon-maskable-512.png", - "sizes": "512x512", - "type": "image/png", - "purpose": "maskable" - } - ] -} diff --git a/examples/github-repository-list/app/windows/.gitignore b/examples/github-repository-list/app/windows/.gitignore deleted file mode 100644 index d492d0d9..00000000 --- a/examples/github-repository-list/app/windows/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -flutter/ephemeral/ - -# Visual Studio user-specific files. -*.suo -*.user -*.userosscache -*.sln.docstates - -# Visual Studio build-related files. -x64/ -x86/ - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ diff --git a/examples/github-repository-list/app/windows/CMakeLists.txt b/examples/github-repository-list/app/windows/CMakeLists.txt deleted file mode 100644 index 9ba329fa..00000000 --- a/examples/github-repository-list/app/windows/CMakeLists.txt +++ /dev/null @@ -1,95 +0,0 @@ -cmake_minimum_required(VERSION 3.14) -project(app LANGUAGES CXX) - -set(BINARY_NAME "app") - -cmake_policy(SET CMP0063 NEW) - -set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") - -# Configure build options. -get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) -if(IS_MULTICONFIG) - set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" - CACHE STRING "" FORCE) -else() - 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() -endif() - -set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") -set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") -set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") -set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") - -# Use Unicode for all projects. -add_definitions(-DUNICODE -D_UNICODE) - -# Compilation settings that should be applied to most targets. -function(APPLY_STANDARD_SETTINGS TARGET) - target_compile_features(${TARGET} PUBLIC cxx_std_17) - target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") - target_compile_options(${TARGET} PRIVATE /EHsc) - target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") - target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") -endfunction() - -set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") - -# Flutter library and tool build rules. -add_subdirectory(${FLUTTER_MANAGED_DIR}) - -# Application build -add_subdirectory("runner") - -# Generated plugin build rules, which manage building the plugins and adding -# them to the application. -include(flutter/generated_plugins.cmake) - - -# === Installation === -# Support files are copied into place next to the executable, so that it can -# run in place. This is done instead of making a separate bundle (as on Linux) -# so that building and running from within Visual Studio will work. -set(BUILD_BUNDLE_DIR "$") -# Make the "install" step default, as it's required to run. -set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) -if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) -endif() - -set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") -set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") - -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) - -if(PLUGIN_BUNDLED_LIBRARIES) - install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) -endif() - -# 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. -install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" - CONFIGURATIONS Profile;Release - COMPONENT Runtime) diff --git a/examples/github-repository-list/app/windows/flutter/generated_plugin_registrant.cc b/examples/github-repository-list/app/windows/flutter/generated_plugin_registrant.cc deleted file mode 100644 index 8083d749..00000000 --- a/examples/github-repository-list/app/windows/flutter/generated_plugin_registrant.cc +++ /dev/null @@ -1,14 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#include "generated_plugin_registrant.h" - -#include - -void RegisterPlugins(flutter::PluginRegistry* registry) { - ConnectivityPlusWindowsPluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin")); -} diff --git a/examples/github-repository-list/app/windows/flutter/generated_plugin_registrant.h b/examples/github-repository-list/app/windows/flutter/generated_plugin_registrant.h deleted file mode 100644 index dc139d85..00000000 --- a/examples/github-repository-list/app/windows/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 RegisterPlugins(flutter::PluginRegistry* registry); - -#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/examples/github-repository-list/app/windows/flutter/generated_plugins.cmake b/examples/github-repository-list/app/windows/flutter/generated_plugins.cmake deleted file mode 100644 index ba4a2175..00000000 --- a/examples/github-repository-list/app/windows/flutter/generated_plugins.cmake +++ /dev/null @@ -1,16 +0,0 @@ -# -# Generated file, do not edit. -# - -list(APPEND FLUTTER_PLUGIN_LIST - connectivity_plus_windows -) - -set(PLUGIN_BUNDLED_LIBRARIES) - -foreach(plugin ${FLUTTER_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows 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) diff --git a/examples/github-repository-list/app/windows/runner/CMakeLists.txt b/examples/github-repository-list/app/windows/runner/CMakeLists.txt deleted file mode 100644 index de2d8916..00000000 --- a/examples/github-repository-list/app/windows/runner/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -cmake_minimum_required(VERSION 3.14) -project(runner LANGUAGES CXX) - -add_executable(${BINARY_NAME} WIN32 - "flutter_window.cpp" - "main.cpp" - "utils.cpp" - "win32_window.cpp" - "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" - "Runner.rc" - "runner.exe.manifest" -) -apply_standard_settings(${BINARY_NAME}) -target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") -target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) -target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") -add_dependencies(${BINARY_NAME} flutter_assemble) diff --git a/examples/github-repository-list/app/windows/runner/Runner.rc b/examples/github-repository-list/app/windows/runner/Runner.rc deleted file mode 100644 index 645c9828..00000000 --- a/examples/github-repository-list/app/windows/runner/Runner.rc +++ /dev/null @@ -1,121 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#pragma code_page(65001) -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "winres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (United States) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""winres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_APP_ICON ICON "resources\\app_icon.ico" - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -#ifdef FLUTTER_BUILD_NUMBER -#define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER -#else -#define VERSION_AS_NUMBER 1,0,0 -#endif - -#ifdef FLUTTER_BUILD_NAME -#define VERSION_AS_STRING #FLUTTER_BUILD_NAME -#else -#define VERSION_AS_STRING "1.0.0" -#endif - -VS_VERSION_INFO VERSIONINFO - FILEVERSION VERSION_AS_NUMBER - PRODUCTVERSION VERSION_AS_NUMBER - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#ifdef _DEBUG - FILEFLAGS VS_FF_DEBUG -#else - FILEFLAGS 0x0L -#endif - FILEOS VOS__WINDOWS32 - FILETYPE VFT_APP - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904e4" - BEGIN - VALUE "CompanyName", "com.example" "\0" - VALUE "FileDescription", "app" "\0" - VALUE "FileVersion", VERSION_AS_STRING "\0" - VALUE "InternalName", "app" "\0" - VALUE "LegalCopyright", "Copyright (C) 2022 com.example. All rights reserved." "\0" - VALUE "OriginalFilename", "app.exe" "\0" - VALUE "ProductName", "app" "\0" - VALUE "ProductVersion", VERSION_AS_STRING "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1252 - END -END - -#endif // English (United States) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED diff --git a/examples/github-repository-list/app/windows/runner/flutter_window.cpp b/examples/github-repository-list/app/windows/runner/flutter_window.cpp deleted file mode 100644 index b43b9095..00000000 --- a/examples/github-repository-list/app/windows/runner/flutter_window.cpp +++ /dev/null @@ -1,61 +0,0 @@ -#include "flutter_window.h" - -#include - -#include "flutter/generated_plugin_registrant.h" - -FlutterWindow::FlutterWindow(const flutter::DartProject& project) - : project_(project) {} - -FlutterWindow::~FlutterWindow() {} - -bool FlutterWindow::OnCreate() { - if (!Win32Window::OnCreate()) { - return false; - } - - RECT frame = GetClientArea(); - - // The size here must match the window dimensions to avoid unnecessary surface - // creation / destruction in the startup path. - flutter_controller_ = std::make_unique( - frame.right - frame.left, frame.bottom - frame.top, project_); - // Ensure that basic setup of the controller was successful. - if (!flutter_controller_->engine() || !flutter_controller_->view()) { - return false; - } - RegisterPlugins(flutter_controller_->engine()); - SetChildContent(flutter_controller_->view()->GetNativeWindow()); - return true; -} - -void FlutterWindow::OnDestroy() { - if (flutter_controller_) { - flutter_controller_ = nullptr; - } - - Win32Window::OnDestroy(); -} - -LRESULT -FlutterWindow::MessageHandler(HWND hwnd, UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept { - // Give Flutter, including plugins, an opportunity to handle window messages. - if (flutter_controller_) { - std::optional result = - flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, - lparam); - if (result) { - return *result; - } - } - - switch (message) { - case WM_FONTCHANGE: - flutter_controller_->engine()->ReloadSystemFonts(); - break; - } - - return Win32Window::MessageHandler(hwnd, message, wparam, lparam); -} diff --git a/examples/github-repository-list/app/windows/runner/flutter_window.h b/examples/github-repository-list/app/windows/runner/flutter_window.h deleted file mode 100644 index 6da0652f..00000000 --- a/examples/github-repository-list/app/windows/runner/flutter_window.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef RUNNER_FLUTTER_WINDOW_H_ -#define RUNNER_FLUTTER_WINDOW_H_ - -#include -#include - -#include - -#include "win32_window.h" - -// A window that does nothing but host a Flutter view. -class FlutterWindow : public Win32Window { - public: - // Creates a new FlutterWindow hosting a Flutter view running |project|. - explicit FlutterWindow(const flutter::DartProject& project); - virtual ~FlutterWindow(); - - protected: - // Win32Window: - bool OnCreate() override; - void OnDestroy() override; - LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, - LPARAM const lparam) noexcept override; - - private: - // The project to run. - flutter::DartProject project_; - - // The Flutter instance hosted by this window. - std::unique_ptr flutter_controller_; -}; - -#endif // RUNNER_FLUTTER_WINDOW_H_ diff --git a/examples/github-repository-list/app/windows/runner/main.cpp b/examples/github-repository-list/app/windows/runner/main.cpp deleted file mode 100644 index 4d470b48..00000000 --- a/examples/github-repository-list/app/windows/runner/main.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include -#include -#include - -#include "flutter_window.h" -#include "utils.h" - -int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, - _In_ wchar_t *command_line, _In_ int show_command) { - // Attach to console when present (e.g., 'flutter run') or create a - // new console when running with a debugger. - if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { - CreateAndAttachConsole(); - } - - // Initialize COM, so that it is available for use in the library and/or - // plugins. - ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); - - flutter::DartProject project(L"data"); - - std::vector command_line_arguments = - GetCommandLineArguments(); - - project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); - - FlutterWindow window(project); - Win32Window::Point origin(10, 10); - Win32Window::Size size(1280, 720); - if (!window.CreateAndShow(L"app", origin, size)) { - return EXIT_FAILURE; - } - window.SetQuitOnClose(true); - - ::MSG msg; - while (::GetMessage(&msg, nullptr, 0, 0)) { - ::TranslateMessage(&msg); - ::DispatchMessage(&msg); - } - - ::CoUninitialize(); - return EXIT_SUCCESS; -} diff --git a/examples/github-repository-list/app/windows/runner/resource.h b/examples/github-repository-list/app/windows/runner/resource.h deleted file mode 100644 index 66a65d1e..00000000 --- a/examples/github-repository-list/app/windows/runner/resource.h +++ /dev/null @@ -1,16 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by Runner.rc -// -#define IDI_APP_ICON 101 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 102 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1001 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/examples/github-repository-list/app/windows/runner/resources/app_icon.ico b/examples/github-repository-list/app/windows/runner/resources/app_icon.ico deleted file mode 100644 index c04e20ca..00000000 Binary files a/examples/github-repository-list/app/windows/runner/resources/app_icon.ico and /dev/null differ diff --git a/examples/github-repository-list/app/windows/runner/runner.exe.manifest b/examples/github-repository-list/app/windows/runner/runner.exe.manifest deleted file mode 100644 index c977c4a4..00000000 --- a/examples/github-repository-list/app/windows/runner/runner.exe.manifest +++ /dev/null @@ -1,20 +0,0 @@ - - - - - PerMonitorV2 - - - - - - - - - - - - - - - diff --git a/examples/github-repository-list/app/windows/runner/utils.cpp b/examples/github-repository-list/app/windows/runner/utils.cpp deleted file mode 100644 index d19bdbbc..00000000 --- a/examples/github-repository-list/app/windows/runner/utils.cpp +++ /dev/null @@ -1,64 +0,0 @@ -#include "utils.h" - -#include -#include -#include -#include - -#include - -void CreateAndAttachConsole() { - if (::AllocConsole()) { - FILE *unused; - if (freopen_s(&unused, "CONOUT$", "w", stdout)) { - _dup2(_fileno(stdout), 1); - } - if (freopen_s(&unused, "CONOUT$", "w", stderr)) { - _dup2(_fileno(stdout), 2); - } - std::ios::sync_with_stdio(); - FlutterDesktopResyncOutputStreams(); - } -} - -std::vector GetCommandLineArguments() { - // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. - int argc; - wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); - if (argv == nullptr) { - return std::vector(); - } - - std::vector command_line_arguments; - - // Skip the first argument as it's the binary name. - for (int i = 1; i < argc; i++) { - command_line_arguments.push_back(Utf8FromUtf16(argv[i])); - } - - ::LocalFree(argv); - - return command_line_arguments; -} - -std::string Utf8FromUtf16(const wchar_t* utf16_string) { - if (utf16_string == nullptr) { - return std::string(); - } - int target_length = ::WideCharToMultiByte( - CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, - -1, nullptr, 0, nullptr, nullptr); - if (target_length == 0) { - return std::string(); - } - std::string utf8_string; - utf8_string.resize(target_length); - int converted_length = ::WideCharToMultiByte( - CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, - -1, utf8_string.data(), - target_length, nullptr, nullptr); - if (converted_length == 0) { - return std::string(); - } - return utf8_string; -} diff --git a/examples/github-repository-list/app/windows/runner/utils.h b/examples/github-repository-list/app/windows/runner/utils.h deleted file mode 100644 index 3879d547..00000000 --- a/examples/github-repository-list/app/windows/runner/utils.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef RUNNER_UTILS_H_ -#define RUNNER_UTILS_H_ - -#include -#include - -// Creates a console for the process, and redirects stdout and stderr to -// it for both the runner and the Flutter library. -void CreateAndAttachConsole(); - -// Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string -// encoded in UTF-8. Returns an empty std::string on failure. -std::string Utf8FromUtf16(const wchar_t* utf16_string); - -// Gets the command line arguments passed in as a std::vector, -// encoded in UTF-8. Returns an empty std::vector on failure. -std::vector GetCommandLineArguments(); - -#endif // RUNNER_UTILS_H_ diff --git a/examples/github-repository-list/app/windows/runner/win32_window.cpp b/examples/github-repository-list/app/windows/runner/win32_window.cpp deleted file mode 100644 index c10f08dc..00000000 --- a/examples/github-repository-list/app/windows/runner/win32_window.cpp +++ /dev/null @@ -1,245 +0,0 @@ -#include "win32_window.h" - -#include - -#include "resource.h" - -namespace { - -constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; - -// The number of Win32Window objects that currently exist. -static int g_active_window_count = 0; - -using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd); - -// Scale helper to convert logical scaler values to physical using passed in -// scale factor -int Scale(int source, double scale_factor) { - return static_cast(source * scale_factor); -} - -// Dynamically loads the |EnableNonClientDpiScaling| from the User32 module. -// This API is only needed for PerMonitor V1 awareness mode. -void EnableFullDpiSupportIfAvailable(HWND hwnd) { - HMODULE user32_module = LoadLibraryA("User32.dll"); - if (!user32_module) { - return; - } - auto enable_non_client_dpi_scaling = - reinterpret_cast( - GetProcAddress(user32_module, "EnableNonClientDpiScaling")); - if (enable_non_client_dpi_scaling != nullptr) { - enable_non_client_dpi_scaling(hwnd); - FreeLibrary(user32_module); - } -} - -} // namespace - -// Manages the Win32Window's window class registration. -class WindowClassRegistrar { - public: - ~WindowClassRegistrar() = default; - - // Returns the singleton registar instance. - static WindowClassRegistrar* GetInstance() { - if (!instance_) { - instance_ = new WindowClassRegistrar(); - } - return instance_; - } - - // Returns the name of the window class, registering the class if it hasn't - // previously been registered. - const wchar_t* GetWindowClass(); - - // Unregisters the window class. Should only be called if there are no - // instances of the window. - void UnregisterWindowClass(); - - private: - WindowClassRegistrar() = default; - - static WindowClassRegistrar* instance_; - - bool class_registered_ = false; -}; - -WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr; - -const wchar_t* WindowClassRegistrar::GetWindowClass() { - if (!class_registered_) { - WNDCLASS window_class{}; - window_class.hCursor = LoadCursor(nullptr, IDC_ARROW); - window_class.lpszClassName = kWindowClassName; - window_class.style = CS_HREDRAW | CS_VREDRAW; - window_class.cbClsExtra = 0; - window_class.cbWndExtra = 0; - window_class.hInstance = GetModuleHandle(nullptr); - window_class.hIcon = - LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); - window_class.hbrBackground = 0; - window_class.lpszMenuName = nullptr; - window_class.lpfnWndProc = Win32Window::WndProc; - RegisterClass(&window_class); - class_registered_ = true; - } - return kWindowClassName; -} - -void WindowClassRegistrar::UnregisterWindowClass() { - UnregisterClass(kWindowClassName, nullptr); - class_registered_ = false; -} - -Win32Window::Win32Window() { - ++g_active_window_count; -} - -Win32Window::~Win32Window() { - --g_active_window_count; - Destroy(); -} - -bool Win32Window::CreateAndShow(const std::wstring& title, - const Point& origin, - const Size& size) { - Destroy(); - - const wchar_t* window_class = - WindowClassRegistrar::GetInstance()->GetWindowClass(); - - const POINT target_point = {static_cast(origin.x), - static_cast(origin.y)}; - HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); - UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); - double scale_factor = dpi / 96.0; - - HWND window = CreateWindow( - window_class, title.c_str(), WS_OVERLAPPEDWINDOW | WS_VISIBLE, - Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), - Scale(size.width, scale_factor), Scale(size.height, scale_factor), - nullptr, nullptr, GetModuleHandle(nullptr), this); - - if (!window) { - return false; - } - - return OnCreate(); -} - -// static -LRESULT CALLBACK Win32Window::WndProc(HWND const window, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept { - if (message == WM_NCCREATE) { - auto window_struct = reinterpret_cast(lparam); - SetWindowLongPtr(window, GWLP_USERDATA, - reinterpret_cast(window_struct->lpCreateParams)); - - auto that = static_cast(window_struct->lpCreateParams); - EnableFullDpiSupportIfAvailable(window); - that->window_handle_ = window; - } else if (Win32Window* that = GetThisFromHandle(window)) { - return that->MessageHandler(window, message, wparam, lparam); - } - - return DefWindowProc(window, message, wparam, lparam); -} - -LRESULT -Win32Window::MessageHandler(HWND hwnd, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept { - switch (message) { - case WM_DESTROY: - window_handle_ = nullptr; - Destroy(); - if (quit_on_close_) { - PostQuitMessage(0); - } - return 0; - - case WM_DPICHANGED: { - auto newRectSize = reinterpret_cast(lparam); - LONG newWidth = newRectSize->right - newRectSize->left; - LONG newHeight = newRectSize->bottom - newRectSize->top; - - SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth, - newHeight, SWP_NOZORDER | SWP_NOACTIVATE); - - return 0; - } - case WM_SIZE: { - RECT rect = GetClientArea(); - if (child_content_ != nullptr) { - // Size and position the child window. - MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, - rect.bottom - rect.top, TRUE); - } - return 0; - } - - case WM_ACTIVATE: - if (child_content_ != nullptr) { - SetFocus(child_content_); - } - return 0; - } - - return DefWindowProc(window_handle_, message, wparam, lparam); -} - -void Win32Window::Destroy() { - OnDestroy(); - - if (window_handle_) { - DestroyWindow(window_handle_); - window_handle_ = nullptr; - } - if (g_active_window_count == 0) { - WindowClassRegistrar::GetInstance()->UnregisterWindowClass(); - } -} - -Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { - return reinterpret_cast( - GetWindowLongPtr(window, GWLP_USERDATA)); -} - -void Win32Window::SetChildContent(HWND content) { - child_content_ = content; - SetParent(content, window_handle_); - RECT frame = GetClientArea(); - - MoveWindow(content, frame.left, frame.top, frame.right - frame.left, - frame.bottom - frame.top, true); - - SetFocus(child_content_); -} - -RECT Win32Window::GetClientArea() { - RECT frame; - GetClientRect(window_handle_, &frame); - return frame; -} - -HWND Win32Window::GetHandle() { - return window_handle_; -} - -void Win32Window::SetQuitOnClose(bool quit_on_close) { - quit_on_close_ = quit_on_close; -} - -bool Win32Window::OnCreate() { - // No-op; provided for subclasses. - return true; -} - -void Win32Window::OnDestroy() { - // No-op; provided for subclasses. -} diff --git a/examples/github-repository-list/app/windows/runner/win32_window.h b/examples/github-repository-list/app/windows/runner/win32_window.h deleted file mode 100644 index 17ba4311..00000000 --- a/examples/github-repository-list/app/windows/runner/win32_window.h +++ /dev/null @@ -1,98 +0,0 @@ -#ifndef RUNNER_WIN32_WINDOW_H_ -#define RUNNER_WIN32_WINDOW_H_ - -#include - -#include -#include -#include - -// A class abstraction for a high DPI-aware Win32 Window. Intended to be -// inherited from by classes that wish to specialize with custom -// rendering and input handling -class Win32Window { - public: - struct Point { - unsigned int x; - unsigned int y; - Point(unsigned int x, unsigned int y) : x(x), y(y) {} - }; - - struct Size { - unsigned int width; - unsigned int height; - Size(unsigned int width, unsigned int height) - : width(width), height(height) {} - }; - - Win32Window(); - virtual ~Win32Window(); - - // Creates and shows a win32 window with |title| and position and size using - // |origin| and |size|. New windows are created on the default monitor. Window - // sizes are specified to the OS in physical pixels, hence to ensure a - // consistent size to will treat the width height passed in to this function - // as logical pixels and scale to appropriate for the default monitor. Returns - // true if the window was created successfully. - bool CreateAndShow(const std::wstring& title, - const Point& origin, - const Size& size); - - // Release OS resources associated with window. - void Destroy(); - - // Inserts |content| into the window tree. - void SetChildContent(HWND content); - - // Returns the backing Window handle to enable clients to set icon and other - // window properties. Returns nullptr if the window has been destroyed. - HWND GetHandle(); - - // If true, closing this window will quit the application. - void SetQuitOnClose(bool quit_on_close); - - // Return a RECT representing the bounds of the current client area. - RECT GetClientArea(); - - protected: - // Processes and route salient window messages for mouse handling, - // size change and DPI. Delegates handling of these to member overloads that - // inheriting classes can handle. - virtual LRESULT MessageHandler(HWND window, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept; - - // Called when CreateAndShow is called, allowing subclass window-related - // setup. Subclasses should return false if setup fails. - virtual bool OnCreate(); - - // Called when Destroy is called. - virtual void OnDestroy(); - - private: - friend class WindowClassRegistrar; - - // OS callback called by message pump. Handles the WM_NCCREATE message which - // is passed when the non-client area is being created and enables automatic - // non-client DPI scaling so that the non-client area automatically - // responsponds to changes in DPI. All other messages are handled by - // MessageHandler. - static LRESULT CALLBACK WndProc(HWND const window, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept; - - // Retrieves a class instance pointer for |window| - static Win32Window* GetThisFromHandle(HWND const window) noexcept; - - bool quit_on_close_ = false; - - // window handle for top level window. - HWND window_handle_ = nullptr; - - // window handle for hosted content. - HWND child_content_ = nullptr; -}; - -#endif // RUNNER_WIN32_WINDOW_H_ diff --git a/examples/github-repository-list/clean_project.sh b/examples/github-repository-list/clean_project.sh deleted file mode 100644 index d900326a..00000000 --- a/examples/github-repository-list/clean_project.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -cd api_sdk -echo "+++++API SDK pub clean+++++" -flutter clean -echo "+++++API SDK done+++++" - - -cd ../shared -echo "+++++Shared pub clean+++++" -flutter clean -echo "+++++Shared done+++++" - -cd ../app -echo "+++++Main app pub clean+++++" -flutter clean -echo "+++++Cleaning done+++++" \ No newline at end of file diff --git a/examples/github-repository-list/github_repo.gif b/examples/github-repository-list/github_repo.gif deleted file mode 100644 index 49519a7d..00000000 Binary files a/examples/github-repository-list/github_repo.gif and /dev/null differ diff --git a/examples/github-repository-list/run_script.sh b/examples/github-repository-list/run_script.sh deleted file mode 100644 index 9f269a83..00000000 --- a/examples/github-repository-list/run_script.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -cd api_sdk -echo "+++++API SDK pub clean+++++" -flutter clean -echo "+++++API SDK pub get+++++" -flutter pub get -echo "+++++API SDK done+++++" - - -cd ../shared -echo "+++++Shared pub clean+++++" -flutter clean -echo "+++++Shared pub get+++++" -flutter pub get -echo "+++++Shared done+++++" - -cd ../app -echo "+++++Main app pub clean+++++" -flutter clean -echo "+++++Main app pub get+++++" -flutter pub get -echo "+++++Main app run+++++" -flutter run \ No newline at end of file diff --git a/examples/github-repository-list/shared/.gitignore b/examples/github-repository-list/shared/.gitignore deleted file mode 100644 index 9d532b18..00000000 --- a/examples/github-repository-list/shared/.gitignore +++ /dev/null @@ -1,41 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json diff --git a/examples/github-repository-list/shared/.metadata b/examples/github-repository-list/shared/.metadata deleted file mode 100644 index 107fcb7b..00000000 --- a/examples/github-repository-list/shared/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 8874f21e79d7ec66d0457c7ab338348e31b17f1d - channel: stable - -project_type: app diff --git a/examples/github-repository-list/shared/README.md b/examples/github-repository-list/shared/README.md deleted file mode 100644 index 25946365..00000000 --- a/examples/github-repository-list/shared/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# shared - -A new Flutter project. - -## Getting Started - -This project is a starting point for a Flutter application. - -A few resources to get you started if this is your first Flutter project: - -- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) - -For help getting started with Flutter, view our -[online documentation](https://flutter.dev/docs), which offers tutorials, -samples, guidance on mobile development, and a full API reference. diff --git a/examples/github-repository-list/shared/lib/main.dart b/examples/github-repository-list/shared/lib/main.dart deleted file mode 100644 index 6781d2d9..00000000 --- a/examples/github-repository-list/shared/lib/main.dart +++ /dev/null @@ -1,7 +0,0 @@ -import 'package:shared_preferences/shared_preferences.dart'; - -export 'package:shared/modules/authentication/auth.dart'; -export 'package:shared/modules/authentication/bloc/bloc_controller.dart'; -export 'package:shared/modules/github_repo/bloc/github_repo_bloc_controller.dart'; - -Future prefs = SharedPreferences.getInstance(); diff --git a/examples/github-repository-list/shared/lib/modules/authentication/auth.dart b/examples/github-repository-list/shared/lib/modules/authentication/auth.dart deleted file mode 100644 index 662c0eb7..00000000 --- a/examples/github-repository-list/shared/lib/modules/authentication/auth.dart +++ /dev/null @@ -1,4 +0,0 @@ -export 'package:shared/modules/authentication/bloc/authentication/authentication_bloc_public.dart'; -export 'package:shared/modules/authentication/models/auth_models_public.dart'; -export 'package:shared/modules/authentication/models/firebase_user.dart'; -export 'package:shared/modules/authentication/resources/authentication_repository.dart'; diff --git a/examples/github-repository-list/shared/lib/modules/authentication/bloc/authentication/authentication_bloc.dart b/examples/github-repository-list/shared/lib/modules/authentication/bloc/authentication/authentication_bloc.dart deleted file mode 100644 index 028c91f7..00000000 --- a/examples/github-repository-list/shared/lib/modules/authentication/bloc/authentication/authentication_bloc.dart +++ /dev/null @@ -1,95 +0,0 @@ -import 'package:bloc/bloc.dart'; -import 'package:shared/main.dart'; -import 'package:shared_preferences/shared_preferences.dart'; - -class AuthenticationBloc - extends Bloc { - final AuthenticationRepository authenticationService = - AuthenticationRepository(); - AuthenticationBloc() : super(AuthenticationInitial()) { - on(_mapAppSignUpLoadedState); - on(_mapUserSignupToState); - on(_mapUserLoginState); - on((event, emit) async { - final SharedPreferences sharedPreferences = await prefs; - sharedPreferences.clear(); - emit(UserLogoutState()); - }); - on((event, emit) async { - final SharedPreferences sharedPreferences = await prefs; - int currentUserId = sharedPreferences.getInt('userId'); - final data = await authenticationService.getUserData(currentUserId ?? 4); - final currentUserData = CurrentUserData.fromJson(data); - emit(SetUserData(currentUserData: currentUserData)); - }); - } - - void _mapAppSignUpLoadedState( - AppLoadedup event, Emitter emit) async { - AuthenticationLoading(); - try { - await Future.delayed(Duration(milliseconds: 500)); // a simulated delay - final SharedPreferences sharedPreferences = await prefs; - if (sharedPreferences.getString('authtoken') != null) { - emit(AppAutheticated()); - } else { - emit(AuthenticationStart()); - } - } catch (e) { - emit(AuthenticationFailure( - message: e.message ?? 'An unknown error occurred')); - } - } - - void _mapUserLoginState( - UserLogin event, Emitter emit) async { - final SharedPreferences sharedPreferences = await prefs; - emit(AuthenticationLoading()); - try { - await Future.delayed(Duration(milliseconds: 500)); // a simulated delay - final data = await authenticationService.loginWithEmailAndPassword( - event.email, event.password); - if (data["error"] == null) { - final currentUser = Token.fromJson(data); - if (currentUser != null) { - sharedPreferences.setString('authtoken', currentUser.token); - emit(AppAutheticated()); - } else { - emit(AuthenticationNotAuthenticated()); - } - } else { - emit(AuthenticationFailure(message: data["error"])); - } - } catch (e) { - emit(AuthenticationFailure( - message: e.toString() ?? 'An unknown error occurred')); - } - } - - void _mapUserSignupToState( - UserSignUp event, Emitter emit) async { - final SharedPreferences sharedPreferences = await prefs; - emit(AuthenticationLoading()); - try { - await Future.delayed(Duration(milliseconds: 500)); // a simulated delay - final data = await authenticationService.signUpWithEmailAndPassword( - event.email, event.password); - - if (data["error"] == null) { - final currentUser = UserData.fromJson(data); - if (currentUser != null) { - sharedPreferences.setString('authtoken', currentUser.token); - sharedPreferences.setInt('userId', currentUser.id); - emit(AppAutheticated()); - } else { - emit(AuthenticationNotAuthenticated()); - } - } else { - emit(AuthenticationFailure(message: data["error"])); - } - } catch (e) { - emit(AuthenticationFailure( - message: e.toString() ?? 'An unknown error occurred')); - } - } -} diff --git a/examples/github-repository-list/shared/lib/modules/authentication/bloc/authentication/authentication_bloc_public.dart b/examples/github-repository-list/shared/lib/modules/authentication/bloc/authentication/authentication_bloc_public.dart deleted file mode 100644 index 4ebb9f73..00000000 --- a/examples/github-repository-list/shared/lib/modules/authentication/bloc/authentication/authentication_bloc_public.dart +++ /dev/null @@ -1,3 +0,0 @@ -export 'package:shared/modules/authentication/bloc/authentication/authentication_bloc.dart'; -export 'package:shared/modules/authentication/bloc/authentication/authentication_event.dart'; -export 'package:shared/modules/authentication/bloc/authentication/authentication_state.dart'; diff --git a/examples/github-repository-list/shared/lib/modules/authentication/bloc/authentication/authentication_event.dart b/examples/github-repository-list/shared/lib/modules/authentication/bloc/authentication/authentication_event.dart deleted file mode 100644 index d6f7a93f..00000000 --- a/examples/github-repository-list/shared/lib/modules/authentication/bloc/authentication/authentication_event.dart +++ /dev/null @@ -1,34 +0,0 @@ -import 'package:meta/meta.dart'; -import 'package:equatable/equatable.dart'; - -abstract class AuthenticationEvent extends Equatable { - const AuthenticationEvent(); - - @override - List get props => []; -} - -// Fired just after the app is launched -class AppLoadedup extends AuthenticationEvent {} - -class UserLogOut extends AuthenticationEvent {} - -class GetUserData extends AuthenticationEvent {} - -class UserSignUp extends AuthenticationEvent { - final String email; - final String password; - UserSignUp({@required this.email, this.password}); - - @override - List get props => [email, password]; -} - -class UserLogin extends AuthenticationEvent { - final String email; - final String password; - UserLogin({@required this.email, this.password}); - - @override - List get props => [email, password]; -} diff --git a/examples/github-repository-list/shared/lib/modules/authentication/bloc/authentication/authentication_state.dart b/examples/github-repository-list/shared/lib/modules/authentication/bloc/authentication/authentication_state.dart deleted file mode 100644 index 627616d0..00000000 --- a/examples/github-repository-list/shared/lib/modules/authentication/bloc/authentication/authentication_state.dart +++ /dev/null @@ -1,38 +0,0 @@ -import 'package:meta/meta.dart'; -import 'package:equatable/equatable.dart'; -import 'package:shared/modules/authentication/models/current_user_data.dart'; - -abstract class AuthenticationState extends Equatable { - const AuthenticationState(); - - @override - List get props => []; -} - -class AppAutheticated extends AuthenticationState {} - -class AuthenticationInitial extends AuthenticationState {} - -class AuthenticationLoading extends AuthenticationState {} - -class AuthenticationStart extends AuthenticationState {} - -class UserLogoutState extends AuthenticationState {} - -class SetUserData extends AuthenticationState { - final CurrentUserData currentUserData; - SetUserData({this.currentUserData}); - @override - List get props => [currentUserData]; -} - -class AuthenticationNotAuthenticated extends AuthenticationState {} - -class AuthenticationFailure extends AuthenticationState { - final String message; - - AuthenticationFailure({@required this.message}); - - @override - List get props => [message]; -} diff --git a/examples/github-repository-list/shared/lib/modules/authentication/bloc/bloc_controller.dart b/examples/github-repository-list/shared/lib/modules/authentication/bloc/bloc_controller.dart deleted file mode 100644 index f5cadbc3..00000000 --- a/examples/github-repository-list/shared/lib/modules/authentication/bloc/bloc_controller.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'package:shared/main.dart'; - -class AuthenticationBlocController { - AuthenticationBlocController._(); - static AuthenticationBlocController _instance = - AuthenticationBlocController._(); - factory AuthenticationBlocController() => _instance; - - // ignore: close_sinks - AuthenticationBloc authenticationBloc = AuthenticationBloc(); -} diff --git a/examples/github-repository-list/shared/lib/modules/authentication/models/auth_models_public.dart b/examples/github-repository-list/shared/lib/modules/authentication/models/auth_models_public.dart deleted file mode 100644 index 040c2e1b..00000000 --- a/examples/github-repository-list/shared/lib/modules/authentication/models/auth_models_public.dart +++ /dev/null @@ -1,4 +0,0 @@ -export 'package:shared/modules/authentication/models/token.dart'; -export 'package:shared/modules/authentication/models/user.dart'; -export 'package:shared/modules/authentication/models/user_data.dart'; -export 'package:shared/modules/authentication/models/current_user_data.dart'; diff --git a/examples/github-repository-list/shared/lib/modules/authentication/models/current_user_data.dart b/examples/github-repository-list/shared/lib/modules/authentication/models/current_user_data.dart deleted file mode 100644 index b4f7fdb6..00000000 --- a/examples/github-repository-list/shared/lib/modules/authentication/models/current_user_data.dart +++ /dev/null @@ -1,77 +0,0 @@ -class CurrentUserData { - Data data; - Ad ad; - - CurrentUserData({this.data, this.ad}); - - CurrentUserData.fromJson(Map json) { - data = json['data'] != null ? new Data.fromJson(json['data']) : Data(); - ad = json['ad'] != null ? new Ad.fromJson(json['ad']) : Ad(); - } - - Map toJson() { - final Map data = new Map(); - if (this.data != null) { - data['data'] = this.data.toJson(); - } - if (this.ad != null) { - data['ad'] = this.ad.toJson(); - } - return data; - } -} - -class Data { - int id; - String email; - String firstName; - String lastName; - String avatar; - - Data( - {this.id, - this.email = '', - this.firstName = '', - this.lastName = '', - this.avatar = ''}); - - Data.fromJson(Map json) { - id = json['id']; - email = json['email']; - firstName = json['first_name']; - lastName = json['last_name']; - avatar = json['avatar']; - } - - Map toJson() { - final Map data = new Map(); - data['id'] = this.id; - data['email'] = this.email; - data['first_name'] = this.firstName; - data['last_name'] = this.lastName; - data['avatar'] = this.avatar; - return data; - } -} - -class Ad { - String company; - String url; - String text; - - Ad({this.company = '', this.url = '', this.text = ''}); - - Ad.fromJson(Map json) { - company = json['company']; - url = json['url']; - text = json['text']; - } - - Map toJson() { - final Map data = new Map(); - data['company'] = this.company; - data['url'] = this.url; - data['text'] = this.text; - return data; - } -} diff --git a/examples/github-repository-list/shared/lib/modules/authentication/models/token.dart b/examples/github-repository-list/shared/lib/modules/authentication/models/token.dart deleted file mode 100644 index 41f1f92a..00000000 --- a/examples/github-repository-list/shared/lib/modules/authentication/models/token.dart +++ /dev/null @@ -1,15 +0,0 @@ -class Token { - String token; - - Token({this.token}); - - Token.fromJson(Map json) { - token = json['token']; - } - - Map toJson() { - final Map data = new Map(); - data['token'] = this.token; - return data; - } -} diff --git a/examples/github-repository-list/shared/lib/modules/authentication/models/user.dart b/examples/github-repository-list/shared/lib/modules/authentication/models/user.dart deleted file mode 100644 index 739c8a04..00000000 --- a/examples/github-repository-list/shared/lib/modules/authentication/models/user.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'package:meta/meta.dart'; - -class MyUser { - final String name; - final String email; - - MyUser({@required this.name, @required this.email}); - - @override - String toString() => 'User { name: $name, email: $email}'; -} diff --git a/examples/github-repository-list/shared/lib/modules/authentication/models/user_data.dart b/examples/github-repository-list/shared/lib/modules/authentication/models/user_data.dart deleted file mode 100644 index 1ef23e6c..00000000 --- a/examples/github-repository-list/shared/lib/modules/authentication/models/user_data.dart +++ /dev/null @@ -1,18 +0,0 @@ -class UserData { - int id; - String token; - - UserData({this.id, this.token}); - - UserData.fromJson(Map json) { - id = json['id']; - token = json['token']; - } - - Map toJson() { - final Map data = new Map(); - data['id'] = this.id; - data['token'] = this.token; - return data; - } -} diff --git a/examples/github-repository-list/shared/lib/modules/authentication/resources/authentication_repository.dart b/examples/github-repository-list/shared/lib/modules/authentication/resources/authentication_repository.dart deleted file mode 100644 index 16671e39..00000000 --- a/examples/github-repository-list/shared/lib/modules/authentication/resources/authentication_repository.dart +++ /dev/null @@ -1,27 +0,0 @@ -import 'package:api_sdk/main.dart'; - -class AuthenticationRepository { - Future signUpWithEmailAndPassword( - String email, String password) async { - await Future.delayed(Duration(seconds: 1)); // simulate a network delay - final response = await ApiSdk.signUpWithEmailAndPassword( - {'email': email, 'password': password}); - - return response; - } - - Future loginWithEmailAndPassword( - String email, String password) async { - await Future.delayed(Duration(seconds: 1)); // simulate a network delay - final response = await ApiSdk.loginWithEmailAndPassword( - {'email': email, 'password': password}); - - return response; - } - - Future getUserData(int id) async { - final response = await ApiSdk.getUserData(id); - - return response; - } -} diff --git a/examples/github-repository-list/shared/lib/modules/github_repo/bloc/github_repo_bloc/github_repo_bloc.dart b/examples/github-repository-list/shared/lib/modules/github_repo/bloc/github_repo_bloc/github_repo_bloc.dart deleted file mode 100644 index e7c89b6a..00000000 --- a/examples/github-repository-list/shared/lib/modules/github_repo/bloc/github_repo_bloc/github_repo_bloc.dart +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:bloc/bloc.dart'; -import 'package:shared/modules/github_repo/bloc/github_repo_bloc/github_repo_public.dart'; - -class GithubRepoBloc extends Bloc { - GithubRepoBloc() : super(GithubRepoStateInitial()) { - on(onGithubRepoDataLoadingEvent); - } - - onGithubRepoDataLoadingEvent( - GithubRepoDataLoadingEvent event, Emitter emit) async { - if (event is GithubRepoDataLoadingEvent) { - emit(GithubRepoStateLoading()); - var fetchedData = await GithubRepoResources.getData(); - emit(GithubRepoDataLoadedState(repositoryData: fetchedData)); - } - } -} diff --git a/examples/github-repository-list/shared/lib/modules/github_repo/bloc/github_repo_bloc/github_repo_event.dart b/examples/github-repository-list/shared/lib/modules/github_repo/bloc/github_repo_bloc/github_repo_event.dart deleted file mode 100644 index 5d667799..00000000 --- a/examples/github-repository-list/shared/lib/modules/github_repo/bloc/github_repo_bloc/github_repo_event.dart +++ /dev/null @@ -1,10 +0,0 @@ -import 'package:equatable/equatable.dart'; - -abstract class GithubRepoEvent extends Equatable { - const GithubRepoEvent(); - - @override - List get props => []; -} - -class GithubRepoDataLoadingEvent extends GithubRepoEvent {} diff --git a/examples/github-repository-list/shared/lib/modules/github_repo/bloc/github_repo_bloc/github_repo_public.dart b/examples/github-repository-list/shared/lib/modules/github_repo/bloc/github_repo_bloc/github_repo_public.dart deleted file mode 100644 index 82d993f6..00000000 --- a/examples/github-repository-list/shared/lib/modules/github_repo/bloc/github_repo_bloc/github_repo_public.dart +++ /dev/null @@ -1,5 +0,0 @@ -export 'package:shared/modules/github_repo/bloc/github_repo_bloc/github_repo_bloc.dart'; -export 'package:shared/modules/github_repo/bloc/github_repo_bloc/github_repo_event.dart'; -export 'package:shared/modules/github_repo/bloc/github_repo_bloc/github_repo_public.dart'; -export 'package:shared/modules/github_repo/bloc/github_repo_bloc/github_repo_state.dart'; -export 'package:shared/modules/github_repo/resources/github_repo_resouces.dart'; diff --git a/examples/github-repository-list/shared/lib/modules/github_repo/bloc/github_repo_bloc/github_repo_state.dart b/examples/github-repository-list/shared/lib/modules/github_repo/bloc/github_repo_bloc/github_repo_state.dart deleted file mode 100644 index 3b70187f..00000000 --- a/examples/github-repository-list/shared/lib/modules/github_repo/bloc/github_repo_bloc/github_repo_state.dart +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:equatable/equatable.dart'; -import 'package:shared/modules/github_repo/models/repo.dart'; - -class GithubRepoDataLoadedState extends GithubRepoState { - final List repositoryData; - GithubRepoDataLoadedState({this.repositoryData}); - @override - List get props => [repositoryData]; -} - -abstract class GithubRepoState extends Equatable { - const GithubRepoState(); - - @override - List get props => []; -} - -class GithubRepoStateInitial extends GithubRepoState {} - -class GithubRepoStateLoading extends GithubRepoState {} diff --git a/examples/github-repository-list/shared/lib/modules/github_repo/bloc/github_repo_bloc_controller.dart b/examples/github-repository-list/shared/lib/modules/github_repo/bloc/github_repo_bloc_controller.dart deleted file mode 100644 index ab90ab21..00000000 --- a/examples/github-repository-list/shared/lib/modules/github_repo/bloc/github_repo_bloc_controller.dart +++ /dev/null @@ -1,12 +0,0 @@ -import 'package:shared/modules/github_repo/bloc/github_repo_bloc/github_repo_bloc.dart'; - -export 'package:shared/modules/github_repo/bloc/github_repo_bloc/github_repo_public.dart'; - -class GithubRepoBlocController { - static GithubRepoBlocController _instance = GithubRepoBlocController._(); - // ignore: close_sinks - GithubRepoBloc authenticationBloc = GithubRepoBloc(); - factory GithubRepoBlocController() => _instance; - - GithubRepoBlocController._(); -} diff --git a/examples/github-repository-list/shared/lib/modules/github_repo/models/repo.dart b/examples/github-repository-list/shared/lib/modules/github_repo/models/repo.dart deleted file mode 100644 index 1a40d800..00000000 --- a/examples/github-repository-list/shared/lib/modules/github_repo/models/repo.dart +++ /dev/null @@ -1,13 +0,0 @@ -class Repo { - const Repo({ - this.id, - this.name, - this.viewerHasStarred, - this.isLoading: false, - }); - - final String id; - final String name; - final bool viewerHasStarred; - final bool isLoading; -} diff --git a/examples/github-repository-list/shared/lib/modules/github_repo/resources/github_repo_resouces.dart b/examples/github-repository-list/shared/lib/modules/github_repo/resources/github_repo_resouces.dart deleted file mode 100644 index 1e51918a..00000000 --- a/examples/github-repository-list/shared/lib/modules/github_repo/resources/github_repo_resouces.dart +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:api_sdk/main.dart'; -import 'package:shared/modules/github_repo/models/repo.dart'; - -class GithubRepoResources { - static Future> getData() async { - final response = await ApiSdk.fetchGithubRepoGraphQl(10); - final List repos = - response.data['viewer']['repositories']['nodes'] as List; - - final List listOfRepos = repos - .map((dynamic e) => Repo( - id: e['id'] as String, - name: e['name'] as String, - viewerHasStarred: e['viewerHasStarred'] as bool, - )) - .toList(); - - return listOfRepos; - } -} diff --git a/examples/github-repository-list/shared/pubspec.lock b/examples/github-repository-list/shared/pubspec.lock deleted file mode 100644 index 36c9e255..00000000 --- a/examples/github-repository-list/shared/pubspec.lock +++ /dev/null @@ -1,600 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - api_sdk: - dependency: "direct main" - description: - path: "../api_sdk" - relative: true - source: path - version: "1.0.0+1" - args: - dependency: transitive - description: - name: args - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.0" - async: - dependency: transitive - description: - name: async - url: "https://pub.dartlang.org" - source: hosted - version: "2.8.2" - bloc: - dependency: "direct main" - description: - name: bloc - url: "https://pub.dartlang.org" - source: hosted - version: "8.0.2" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - characters: - dependency: transitive - description: - name: characters - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - clock: - dependency: transitive - description: - name: clock - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - collection: - dependency: transitive - description: - name: collection - url: "https://pub.dartlang.org" - source: hosted - version: "1.15.0" - connectivity_plus: - dependency: transitive - description: - name: connectivity_plus - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.1" - connectivity_plus_linux: - dependency: transitive - description: - name: connectivity_plus_linux - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - connectivity_plus_macos: - dependency: transitive - description: - name: connectivity_plus_macos - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.1" - connectivity_plus_platform_interface: - dependency: transitive - description: - name: connectivity_plus_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_web: - dependency: transitive - description: - name: connectivity_plus_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_windows: - dependency: transitive - description: - name: connectivity_plus_windows - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - crypto: - dependency: transitive - description: - name: crypto - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - dbus: - dependency: transitive - description: - name: dbus - url: "https://pub.dartlang.org" - source: hosted - version: "0.7.1" - equatable: - dependency: "direct main" - description: - name: equatable - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - fake_async: - dependency: transitive - description: - name: fake_async - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - ffi: - dependency: transitive - description: - name: ffi - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.2" - file: - dependency: transitive - description: - name: file - url: "https://pub.dartlang.org" - source: hosted - version: "6.1.2" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_bloc: - dependency: "direct main" - description: - name: flutter_bloc - url: "https://pub.dartlang.org" - source: hosted - version: "8.0.1" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - freezed_annotation: - dependency: transitive - description: - name: freezed_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - gql: - dependency: transitive - description: - name: gql - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.0" - gql_dedupe_link: - dependency: transitive - description: - name: gql_dedupe_link - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - gql_error_link: - dependency: transitive - description: - name: gql_error_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - gql_exec: - dependency: transitive - description: - name: gql_exec - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.0" - gql_http_link: - dependency: transitive - description: - name: gql_http_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.0" - gql_link: - dependency: transitive - description: - name: gql_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.0" - gql_transform_link: - dependency: transitive - description: - name: gql_transform_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - graphql: - dependency: transitive - description: - name: graphql - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.1" - graphql_flutter: - dependency: transitive - description: - name: graphql_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.1" - hive: - dependency: transitive - description: - name: hive - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - http: - dependency: transitive - description: - name: http - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.4" - http_parser: - dependency: transitive - description: - name: http_parser - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.0" - js: - dependency: transitive - description: - name: js - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.3" - json_annotation: - dependency: transitive - description: - name: json_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "4.4.0" - matcher: - dependency: transitive - description: - name: matcher - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.11" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.3" - meta: - dependency: transitive - description: - name: meta - url: "https://pub.dartlang.org" - source: hosted - version: "1.7.0" - nested: - dependency: transitive - description: - name: nested - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - nm: - dependency: transitive - description: - name: nm - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.0" - normalize: - dependency: transitive - description: - name: normalize - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.0" - path: - dependency: transitive - description: - name: path - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0" - path_provider: - dependency: "direct main" - description: - name: path_provider - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.8" - path_provider_android: - dependency: transitive - description: - name: path_provider_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.11" - path_provider_ios: - dependency: transitive - description: - name: path_provider_ios - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.7" - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.5" - path_provider_macos: - dependency: transitive - description: - name: path_provider_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - petitparser: - dependency: transitive - description: - name: petitparser - url: "https://pub.dartlang.org" - source: hosted - version: "4.4.0" - platform: - dependency: transitive - description: - name: platform - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.2" - process: - dependency: transitive - description: - name: process - url: "https://pub.dartlang.org" - source: hosted - version: "4.2.4" - provider: - dependency: transitive - description: - name: provider - url: "https://pub.dartlang.org" - source: hosted - version: "6.0.2" - rxdart: - dependency: "direct main" - description: - name: rxdart - url: "https://pub.dartlang.org" - source: hosted - version: "0.27.3" - shared_preferences: - dependency: "direct main" - description: - name: shared_preferences - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.13" - shared_preferences_android: - dependency: transitive - description: - name: shared_preferences_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.10" - shared_preferences_ios: - dependency: transitive - description: - name: shared_preferences_ios - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.9" - shared_preferences_linux: - dependency: transitive - description: - name: shared_preferences_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.4" - shared_preferences_macos: - dependency: transitive - description: - name: shared_preferences_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.2" - shared_preferences_platform_interface: - dependency: transitive - description: - name: shared_preferences_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - shared_preferences_web: - dependency: transitive - description: - name: shared_preferences_web - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - shared_preferences_windows: - dependency: transitive - description: - name: shared_preferences_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.4" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_span: - dependency: transitive - description: - name: source_span - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.1" - sqflite: - dependency: "direct main" - description: - name: sqflite - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.2" - sqflite_common: - dependency: transitive - description: - name: sqflite_common - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.0" - stack_trace: - dependency: transitive - description: - name: stack_trace - url: "https://pub.dartlang.org" - source: hosted - version: "1.10.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - synchronized: - dependency: transitive - description: - name: synchronized - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - test_api: - dependency: transitive - description: - name: test_api - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.8" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - uuid: - dependency: transitive - description: - name: uuid - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.5" - vector_math: - dependency: transitive - description: - name: vector_math - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - win32: - dependency: transitive - description: - name: win32 - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.11" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0+1" - xml: - dependency: transitive - description: - name: xml - url: "https://pub.dartlang.org" - source: hosted - version: "5.3.1" -sdks: - dart: ">=2.15.0 <3.0.0" - flutter: ">=2.5.0" diff --git a/examples/github-repository-list/shared/pubspec.yaml b/examples/github-repository-list/shared/pubspec.yaml deleted file mode 100644 index 38ad2738..00000000 --- a/examples/github-repository-list/shared/pubspec.yaml +++ /dev/null @@ -1,84 +0,0 @@ -name: shared -description: A new Flutter project. - -# The following line prevents the package from being accidentally published to -# pub.dev using `pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev - -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.0+1 - -environment: - sdk: ">=2.7.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.0 - sqflite: ^2.0.2 - path_provider: ^2.0.8 - rxdart: ^0.27.3 - bloc: ^8.0.2 - flutter_bloc: ^8.0.1 - equatable: ^2.0.3 - shared_preferences: ^2.0.12 - api_sdk: - path: ../api_sdk -dev_dependencies: - flutter_test: - sdk: flutter - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter. -flutter: - - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. - uses-material-design: true - - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware. - - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/assets-and-images/#from-packages - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/custom-fonts/#from-packages diff --git a/examples/github-repository-list/shared/test/widget_test.dart b/examples/github-repository-list/shared/test/widget_test.dart deleted file mode 100644 index 570e0e47..00000000 --- a/examples/github-repository-list/shared/test/widget_test.dart +++ /dev/null @@ -1,8 +0,0 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility that Flutter provides. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - -void main() {} diff --git a/examples/hacker-news/README.md b/examples/hacker-news/README.md deleted file mode 100644 index 1b841769..00000000 --- a/examples/hacker-news/README.md +++ /dev/null @@ -1,22 +0,0 @@ -# flutter-starter-kit - -A Hacker news App (boilerplate). - -- To run - Run this `bash run_script.sh` at root directory. -The api url is in `api-constants.dart` - -```dart -Map apiConstants = { - "hacker_news": "https://hacker-news.firebaseio.com/v0", - "auth": "https://reqres.in/api" -}; -``` -To Signup use this credantials: -``` -Email "eve.holt@reqres.in", -Password "pistol" -``` -The demo for the app looks like this: - - \ No newline at end of file diff --git a/examples/hacker-news/api_sdk/.gitignore b/examples/hacker-news/api_sdk/.gitignore deleted file mode 100644 index 9d532b18..00000000 --- a/examples/hacker-news/api_sdk/.gitignore +++ /dev/null @@ -1,41 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json diff --git a/examples/hacker-news/api_sdk/.metadata b/examples/hacker-news/api_sdk/.metadata deleted file mode 100644 index 107fcb7b..00000000 --- a/examples/hacker-news/api_sdk/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 8874f21e79d7ec66d0457c7ab338348e31b17f1d - channel: stable - -project_type: app diff --git a/examples/hacker-news/api_sdk/README.md b/examples/hacker-news/api_sdk/README.md deleted file mode 100644 index 39e5a3fa..00000000 --- a/examples/hacker-news/api_sdk/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# api_sdk - -A new Flutter project. - -## Getting Started - -This project is a starting point for a Flutter application. - -A few resources to get you started if this is your first Flutter project: - -- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) - -For help getting started with Flutter, view our -[online documentation](https://flutter.dev/docs), which offers tutorials, -samples, guidance on mobile development, and a full API reference. diff --git a/examples/hacker-news/api_sdk/lib/api_constants.dart b/examples/hacker-news/api_sdk/lib/api_constants.dart deleted file mode 100644 index 8fc06902..00000000 --- a/examples/hacker-news/api_sdk/lib/api_constants.dart +++ /dev/null @@ -1,4 +0,0 @@ -Map apiConstants = { - "hacker_news": "https://hacker-news.firebaseio.com/v0", - "auth": "https://reqres.in/api" -}; diff --git a/examples/hacker-news/api_sdk/lib/main.dart b/examples/hacker-news/api_sdk/lib/main.dart deleted file mode 100644 index ba4ff651..00000000 --- a/examples/hacker-news/api_sdk/lib/main.dart +++ /dev/null @@ -1,34 +0,0 @@ -import 'package:api_sdk/api_constants.dart'; -import 'package:api_sdk/rest/rest_api_handler_data.dart'; - -class ApiSdk { - static loginWithEmailAndPassword(dynamic body) async { - final response = await RestApiHandlerData.postData( - '${apiConstants["auth"]}/login', body); - return response; - } - - static signUpWithEmailAndPassword(dynamic body) async { - final response = await RestApiHandlerData.postData( - '${apiConstants["auth"]}/register', body); - return response; - } - - static getUserData(int id) async { - final response = - await RestApiHandlerData.getData('${apiConstants["auth"]}/users/$id'); - return response; - } - - static fetchTopId() async { - final response = await RestApiHandlerData.getData( - '${apiConstants["hacker_news"]}/topstories.json'); - return response; - } - - static fetchItems(int id) async { - final response = await RestApiHandlerData.getData( - '${apiConstants["hacker_news"]}/item/$id.json'); - return response; - } -} diff --git a/examples/hacker-news/api_sdk/lib/rest/api_helpers/api_base_helper.dart b/examples/hacker-news/api_sdk/lib/rest/api_helpers/api_base_helper.dart deleted file mode 100644 index 26fc9682..00000000 --- a/examples/hacker-news/api_sdk/lib/rest/api_helpers/api_base_helper.dart +++ /dev/null @@ -1,72 +0,0 @@ -import 'dart:convert'; -import 'dart:io'; - -import 'package:http/http.dart' as http; - -import 'api_exception.dart'; - -dynamic _returnResponse(http.Response response) { - switch (response.statusCode) { - case 200: - var responseJson = json.decode(response.body.toString()); - return responseJson; - case 400: - return json.decode(response.body.toString()); - case 401: - case 403: - return json.decode(response.body.toString()); - case 500: - default: - return FetchDataException( - 'Error occured while Communication with Server with StatusCode : ${response.statusCode}'); - } -} - -class ApiBaseHelper { - Future delete(String url) async { - var apiResponse; - try { - final response = await http.delete(Uri.parse(url)); - apiResponse = _returnResponse(response); - } on SocketException { - throw FetchDataException('No Internet connection'); - } - - return apiResponse; - } - - Future get(String url) async { - var responseJson; - try { - final response = await http.get(Uri.parse(url)); - responseJson = _returnResponse(response); - } on SocketException { - throw FetchDataException('No Internet connection'); - } - return responseJson; - } - - Future post(String url, dynamic body) async { - var responseJson; - try { - final response = await http.post(Uri.parse(url), body: body); - responseJson = _returnResponse(response); - } on SocketException { - throw FetchDataException('No Internet connection'); - } - - return responseJson; - } - - Future put(String url, dynamic body) async { - var responseJson; - try { - final response = await http.put(Uri.parse(url), body: body); - responseJson = _returnResponse(response); - } on SocketException { - throw FetchDataException('No Internet connection'); - } - - return responseJson; - } -} diff --git a/examples/hacker-news/api_sdk/lib/rest/api_helpers/api_exception.dart b/examples/hacker-news/api_sdk/lib/rest/api_helpers/api_exception.dart deleted file mode 100644 index acdc758e..00000000 --- a/examples/hacker-news/api_sdk/lib/rest/api_helpers/api_exception.dart +++ /dev/null @@ -1,27 +0,0 @@ -class AppException implements Exception { - final _message; - final _prefix; - - AppException([this._message, this._prefix]); - - String toString() { - return "$_prefix$_message"; - } -} - -class FetchDataException extends AppException { - FetchDataException([String message]) - : super(message, "Error During Communication: "); -} - -class BadRequestException extends AppException { - BadRequestException([message]) : super(message, "Invalid Request: "); -} - -class UnauthorisedException extends AppException { - UnauthorisedException([message]) : super(message, "Unauthorised: "); -} - -class InvalidInputException extends AppException { - InvalidInputException([String message]) : super(message, "Invalid Input: "); -} diff --git a/examples/hacker-news/api_sdk/lib/rest/rest_api_handler_data.dart b/examples/hacker-news/api_sdk/lib/rest/rest_api_handler_data.dart deleted file mode 100644 index 8dd7e51b..00000000 --- a/examples/hacker-news/api_sdk/lib/rest/rest_api_handler_data.dart +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:api_sdk/rest/api_helpers/api_base_helper.dart'; - -class RestApiHandlerData { - static ApiBaseHelper _apiBaseHelper = ApiBaseHelper(); - static getData(String path) async { - final response = await _apiBaseHelper.get('$path'); - return response; - } - - static postData(String path, dynamic body) async { - final response = await _apiBaseHelper.post('$path', body); - return response; - } -} diff --git a/examples/hacker-news/api_sdk/pubspec.lock b/examples/hacker-news/api_sdk/pubspec.lock deleted file mode 100644 index d4fa3f9a..00000000 --- a/examples/hacker-news/api_sdk/pubspec.lock +++ /dev/null @@ -1,488 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - args: - dependency: transitive - description: - name: args - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.0" - async: - dependency: transitive - description: - name: async - url: "https://pub.dartlang.org" - source: hosted - version: "2.8.2" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - characters: - dependency: transitive - description: - name: characters - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - clock: - dependency: transitive - description: - name: clock - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - collection: - dependency: transitive - description: - name: collection - url: "https://pub.dartlang.org" - source: hosted - version: "1.15.0" - connectivity_plus: - dependency: transitive - description: - name: connectivity_plus - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.1" - connectivity_plus_linux: - dependency: transitive - description: - name: connectivity_plus_linux - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - connectivity_plus_macos: - dependency: transitive - description: - name: connectivity_plus_macos - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.1" - connectivity_plus_platform_interface: - dependency: transitive - description: - name: connectivity_plus_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_web: - dependency: transitive - description: - name: connectivity_plus_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_windows: - dependency: transitive - description: - name: connectivity_plus_windows - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - crypto: - dependency: transitive - description: - name: crypto - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.4" - dbus: - dependency: transitive - description: - name: dbus - url: "https://pub.dartlang.org" - source: hosted - version: "0.7.1" - equatable: - dependency: "direct main" - description: - name: equatable - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - fake_async: - dependency: transitive - description: - name: fake_async - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - ffi: - dependency: transitive - description: - name: ffi - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.2" - file: - dependency: transitive - description: - name: file - url: "https://pub.dartlang.org" - source: hosted - version: "6.1.2" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - freezed_annotation: - dependency: "direct main" - description: - name: freezed_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - gql: - dependency: "direct main" - description: - name: gql - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.0" - gql_dedupe_link: - dependency: transitive - description: - name: gql_dedupe_link - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - gql_error_link: - dependency: transitive - description: - name: gql_error_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - gql_exec: - dependency: transitive - description: - name: gql_exec - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.0" - gql_http_link: - dependency: transitive - description: - name: gql_http_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.0" - gql_link: - dependency: transitive - description: - name: gql_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.0" - gql_transform_link: - dependency: transitive - description: - name: gql_transform_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - graphql: - dependency: "direct main" - description: - name: graphql - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.1" - graphql_flutter: - dependency: "direct main" - description: - name: graphql_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.1" - hive: - dependency: transitive - description: - name: hive - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - http: - dependency: "direct main" - description: - name: http - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.4" - http_parser: - dependency: transitive - description: - name: http_parser - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.0" - js: - dependency: transitive - description: - name: js - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.3" - json_annotation: - dependency: transitive - description: - name: json_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "4.4.0" - matcher: - dependency: transitive - description: - name: matcher - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.11" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.3" - meta: - dependency: transitive - description: - name: meta - url: "https://pub.dartlang.org" - source: hosted - version: "1.7.0" - nm: - dependency: transitive - description: - name: nm - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.0" - normalize: - dependency: transitive - description: - name: normalize - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.0+1" - path: - dependency: transitive - description: - name: path - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0" - path_provider: - dependency: transitive - description: - name: path_provider - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.9" - path_provider_android: - dependency: transitive - description: - name: path_provider_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.12" - path_provider_ios: - dependency: transitive - description: - name: path_provider_ios - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.8" - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.5" - path_provider_macos: - dependency: transitive - description: - name: path_provider_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - petitparser: - dependency: transitive - description: - name: petitparser - url: "https://pub.dartlang.org" - source: hosted - version: "4.4.0" - platform: - dependency: transitive - description: - name: platform - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.2" - process: - dependency: transitive - description: - name: process - url: "https://pub.dartlang.org" - source: hosted - version: "4.2.4" - rxdart: - dependency: transitive - description: - name: rxdart - url: "https://pub.dartlang.org" - source: hosted - version: "0.27.3" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_span: - dependency: transitive - description: - name: source_span - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.1" - stack_trace: - dependency: transitive - description: - name: stack_trace - url: "https://pub.dartlang.org" - source: hosted - version: "1.10.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - test_api: - dependency: transitive - description: - name: test_api - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.8" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - uuid: - dependency: transitive - description: - name: uuid - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.6" - vector_math: - dependency: transitive - description: - name: vector_math - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - win32: - dependency: transitive - description: - name: win32 - url: "https://pub.dartlang.org" - source: hosted - version: "2.4.2" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0+1" - xml: - dependency: transitive - description: - name: xml - url: "https://pub.dartlang.org" - source: hosted - version: "5.3.1" -sdks: - dart: ">=2.15.0 <3.0.0" - flutter: ">=2.8.0" diff --git a/examples/hacker-news/api_sdk/pubspec.yaml b/examples/hacker-news/api_sdk/pubspec.yaml deleted file mode 100644 index 749a87a9..00000000 --- a/examples/hacker-news/api_sdk/pubspec.yaml +++ /dev/null @@ -1,84 +0,0 @@ -name: api_sdk -description: A new Flutter project. - -# The following line prevents the package from being accidentally published to -# pub.dev using `pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev - -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.0+1 - -environment: - sdk: ">=2.7.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.0 - http: - - graphql: ^5.0.1 - graphql_flutter: ^5.0.1 - gql: ^0.13.0 - freezed_annotation: ^1.1.0 - - equatable: ^2.0.3 - -dev_dependencies: - flutter_test: - sdk: flutter - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter. -flutter: - - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. - uses-material-design: true - - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware. - - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/assets-and-images/#from-packages - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/custom-fonts/#from-packages diff --git a/examples/hacker-news/api_sdk/test/widget_test.dart b/examples/hacker-news/api_sdk/test/widget_test.dart deleted file mode 100644 index 570e0e47..00000000 --- a/examples/hacker-news/api_sdk/test/widget_test.dart +++ /dev/null @@ -1,8 +0,0 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility that Flutter provides. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - -void main() {} diff --git a/examples/hacker-news/app/.gitignore b/examples/hacker-news/app/.gitignore deleted file mode 100644 index 0fa6b675..00000000 --- a/examples/hacker-news/app/.gitignore +++ /dev/null @@ -1,46 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json - -# Android Studio will place build artifacts here -/android/app/debug -/android/app/profile -/android/app/release diff --git a/examples/hacker-news/app/.metadata b/examples/hacker-news/app/.metadata deleted file mode 100644 index 5a023280..00000000 --- a/examples/hacker-news/app/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 7e9793dee1b85a243edd0e06cb1658e98b077561 - channel: stable - -project_type: app diff --git a/examples/hacker-news/app/README.md b/examples/hacker-news/app/README.md deleted file mode 100644 index e7694a28..00000000 --- a/examples/hacker-news/app/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# app - -A new Flutter project. - -## Getting Started - -This project is a starting point for a Flutter application. - -A few resources to get you started if this is your first Flutter project: - -- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) - -For help getting started with Flutter, view our -[online documentation](https://flutter.dev/docs), which offers tutorials, -samples, guidance on mobile development, and a full API reference. diff --git a/examples/hacker-news/app/analysis_options.yaml b/examples/hacker-news/app/analysis_options.yaml deleted file mode 100644 index 61b6c4de..00000000 --- a/examples/hacker-news/app/analysis_options.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# This file configures the analyzer, which statically analyzes Dart code to -# check for errors, warnings, and lints. -# -# The issues identified by the analyzer are surfaced in the UI of Dart-enabled -# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be -# invoked from the command line by running `flutter analyze`. - -# 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 - -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` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at - # https://dart-lang.github.io/linter/lints/index.html. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. - rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/examples/hacker-news/app/android/.gitignore b/examples/hacker-news/app/android/.gitignore deleted file mode 100644 index 6f568019..00000000 --- a/examples/hacker-news/app/android/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java - -# Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app -key.properties -**/*.keystore -**/*.jks diff --git a/examples/hacker-news/app/android/app/build.gradle b/examples/hacker-news/app/android/app/build.gradle deleted file mode 100644 index 2a6af6eb..00000000 --- a/examples/hacker-news/app/android/app/build.gradle +++ /dev/null @@ -1,68 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion flutter.compileSdkVersion - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = '1.8' - } - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.app" - minSdkVersion flutter.minSdkVersion - targetSdkVersion flutter.targetSdkVersion - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/examples/hacker-news/app/android/app/src/debug/AndroidManifest.xml b/examples/hacker-news/app/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index 99f406bd..00000000 --- a/examples/hacker-news/app/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/examples/hacker-news/app/android/app/src/main/AndroidManifest.xml b/examples/hacker-news/app/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 3f2d4034..00000000 --- a/examples/hacker-news/app/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - diff --git a/examples/hacker-news/app/android/app/src/main/kotlin/com/example/app/MainActivity.kt b/examples/hacker-news/app/android/app/src/main/kotlin/com/example/app/MainActivity.kt deleted file mode 100644 index 461fcfba..00000000 --- a/examples/hacker-news/app/android/app/src/main/kotlin/com/example/app/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.app - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/examples/hacker-news/app/android/app/src/main/res/drawable-v21/launch_background.xml b/examples/hacker-news/app/android/app/src/main/res/drawable-v21/launch_background.xml deleted file mode 100644 index f74085f3..00000000 --- a/examples/hacker-news/app/android/app/src/main/res/drawable-v21/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/examples/hacker-news/app/android/app/src/main/res/drawable/launch_background.xml b/examples/hacker-news/app/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f8..00000000 --- a/examples/hacker-news/app/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/examples/hacker-news/app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/examples/hacker-news/app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b..00000000 Binary files a/examples/hacker-news/app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/examples/hacker-news/app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/examples/hacker-news/app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79..00000000 Binary files a/examples/hacker-news/app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/examples/hacker-news/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/examples/hacker-news/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d43914..00000000 Binary files a/examples/hacker-news/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/hacker-news/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/examples/hacker-news/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d3..00000000 Binary files a/examples/hacker-news/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/hacker-news/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/examples/hacker-news/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372ee..00000000 Binary files a/examples/hacker-news/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/hacker-news/app/android/app/src/main/res/values-night/styles.xml b/examples/hacker-news/app/android/app/src/main/res/values-night/styles.xml deleted file mode 100644 index 3db14bb5..00000000 --- a/examples/hacker-news/app/android/app/src/main/res/values-night/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/examples/hacker-news/app/android/app/src/main/res/values/styles.xml b/examples/hacker-news/app/android/app/src/main/res/values/styles.xml deleted file mode 100644 index d460d1e9..00000000 --- a/examples/hacker-news/app/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/examples/hacker-news/app/android/app/src/profile/AndroidManifest.xml b/examples/hacker-news/app/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index 99f406bd..00000000 --- a/examples/hacker-news/app/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/examples/hacker-news/app/android/build.gradle b/examples/hacker-news/app/android/build.gradle deleted file mode 100644 index 4256f917..00000000 --- a/examples/hacker-news/app/android/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -buildscript { - ext.kotlin_version = '1.6.10' - repositories { - google() - mavenCentral() - } - - dependencies { - classpath 'com.android.tools.build:gradle:4.1.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - mavenCentral() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/examples/hacker-news/app/android/gradle.properties b/examples/hacker-news/app/android/gradle.properties deleted file mode 100644 index 94adc3a3..00000000 --- a/examples/hacker-news/app/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.useAndroidX=true -android.enableJetifier=true diff --git a/examples/hacker-news/app/android/gradle/wrapper/gradle-wrapper.properties b/examples/hacker-news/app/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index bc6a58af..00000000 --- a/examples/hacker-news/app/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip diff --git a/examples/hacker-news/app/android/settings.gradle b/examples/hacker-news/app/android/settings.gradle deleted file mode 100644 index 44e62bcf..00000000 --- a/examples/hacker-news/app/android/settings.gradle +++ /dev/null @@ -1,11 +0,0 @@ -include ':app' - -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() - -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } - -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/examples/hacker-news/app/assets/images/2.0x/logo.png b/examples/hacker-news/app/assets/images/2.0x/logo.png deleted file mode 100644 index f2c967ff..00000000 Binary files a/examples/hacker-news/app/assets/images/2.0x/logo.png and /dev/null differ diff --git a/examples/hacker-news/app/assets/images/3.0x/logo.png b/examples/hacker-news/app/assets/images/3.0x/logo.png deleted file mode 100644 index 6b5dcc95..00000000 Binary files a/examples/hacker-news/app/assets/images/3.0x/logo.png and /dev/null differ diff --git a/examples/hacker-news/app/assets/images/logo.png b/examples/hacker-news/app/assets/images/logo.png deleted file mode 100644 index aba93c52..00000000 Binary files a/examples/hacker-news/app/assets/images/logo.png and /dev/null differ diff --git a/examples/hacker-news/app/ios/.gitignore b/examples/hacker-news/app/ios/.gitignore deleted file mode 100644 index 7a7f9873..00000000 --- a/examples/hacker-news/app/ios/.gitignore +++ /dev/null @@ -1,34 +0,0 @@ -**/dgph -*.mode1v3 -*.mode2v3 -*.moved-aside -*.pbxuser -*.perspectivev3 -**/*sync/ -.sconsign.dblite -.tags* -**/.vagrant/ -**/DerivedData/ -Icon? -**/Pods/ -**/.symlinks/ -profile -xcuserdata -**/.generated/ -Flutter/App.framework -Flutter/Flutter.framework -Flutter/Flutter.podspec -Flutter/Generated.xcconfig -Flutter/ephemeral/ -Flutter/app.flx -Flutter/app.zip -Flutter/flutter_assets/ -Flutter/flutter_export_environment.sh -ServiceDefinitions.json -Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!default.mode1v3 -!default.mode2v3 -!default.pbxuser -!default.perspectivev3 diff --git a/examples/hacker-news/app/ios/Flutter/AppFrameworkInfo.plist b/examples/hacker-news/app/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 8d4492f9..00000000 --- a/examples/hacker-news/app/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 9.0 - - diff --git a/examples/hacker-news/app/ios/Flutter/Debug.xcconfig b/examples/hacker-news/app/ios/Flutter/Debug.xcconfig deleted file mode 100644 index 592ceee8..00000000 --- a/examples/hacker-news/app/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/examples/hacker-news/app/ios/Flutter/Release.xcconfig b/examples/hacker-news/app/ios/Flutter/Release.xcconfig deleted file mode 100644 index 592ceee8..00000000 --- a/examples/hacker-news/app/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/examples/hacker-news/app/ios/Runner.xcodeproj/project.pbxproj b/examples/hacker-news/app/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index fb16edd3..00000000 --- a/examples/hacker-news/app/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,481 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 50; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - ); - path = Runner; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1300; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 1100; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - 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_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - 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_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.app; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - 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_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - 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_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - 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_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - 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_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - 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_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.app; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.app; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/examples/hacker-news/app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/hacker-news/app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6..00000000 --- a/examples/hacker-news/app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/examples/hacker-news/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/hacker-news/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/examples/hacker-news/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/hacker-news/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/hacker-news/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5..00000000 --- a/examples/hacker-news/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/examples/hacker-news/app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/examples/hacker-news/app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index c87d15a3..00000000 --- a/examples/hacker-news/app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/hacker-news/app/ios/Runner.xcworkspace/contents.xcworkspacedata b/examples/hacker-news/app/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16..00000000 --- a/examples/hacker-news/app/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/examples/hacker-news/app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/hacker-news/app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/examples/hacker-news/app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/hacker-news/app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/hacker-news/app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5..00000000 --- a/examples/hacker-news/app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/examples/hacker-news/app/ios/Runner/AppDelegate.swift b/examples/hacker-news/app/ios/Runner/AppDelegate.swift deleted file mode 100644 index 70693e4a..00000000 --- a/examples/hacker-news/app/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import UIKit -import Flutter - -@UIApplicationMain -@objc class AppDelegate: FlutterAppDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } -} diff --git a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d36b1fab..00000000 --- a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "Icon-App-1024x1024@1x.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada47..00000000 Binary files a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf03..00000000 Binary files a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd96..00000000 Binary files a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0..00000000 Binary files a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde1211..00000000 Binary files a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7..00000000 Binary files a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306..00000000 Binary files a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd96..00000000 Binary files a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f..00000000 Binary files a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b860..00000000 Binary files a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b860..00000000 Binary files a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164..00000000 Binary files a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d3..00000000 Binary files a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e..00000000 Binary files a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f585..00000000 Binary files a/examples/hacker-news/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/examples/hacker-news/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/examples/hacker-news/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 0bedcf2f..00000000 --- a/examples/hacker-news/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "LaunchImage.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/examples/hacker-news/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/examples/hacker-news/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eac..00000000 Binary files a/examples/hacker-news/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/examples/hacker-news/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/examples/hacker-news/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eac..00000000 Binary files a/examples/hacker-news/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/examples/hacker-news/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/examples/hacker-news/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eac..00000000 Binary files a/examples/hacker-news/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/examples/hacker-news/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/examples/hacker-news/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b..00000000 --- a/examples/hacker-news/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/examples/hacker-news/app/ios/Runner/Base.lproj/LaunchScreen.storyboard b/examples/hacker-news/app/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7..00000000 --- a/examples/hacker-news/app/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/hacker-news/app/ios/Runner/Base.lproj/Main.storyboard b/examples/hacker-news/app/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516..00000000 --- a/examples/hacker-news/app/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/hacker-news/app/ios/Runner/Info.plist b/examples/hacker-news/app/ios/Runner/Info.plist deleted file mode 100644 index 00943528..00000000 --- a/examples/hacker-news/app/ios/Runner/Info.plist +++ /dev/null @@ -1,47 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleDisplayName - App - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - app - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/examples/hacker-news/app/ios/Runner/Runner-Bridging-Header.h b/examples/hacker-news/app/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 308a2a56..00000000 --- a/examples/hacker-news/app/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" diff --git a/examples/hacker-news/app/lib/main.dart b/examples/hacker-news/app/lib/main.dart deleted file mode 100644 index e5859d7c..00000000 --- a/examples/hacker-news/app/lib/main.dart +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:app/src/app.dart'; -import 'package:app/src/utils/app_state_notifier.dart'; -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -void main() { - runApp( - ChangeNotifierProvider( - create: (_) => AppStateNotifier(), - child: App(), - ), - ); -} diff --git a/examples/hacker-news/app/lib/src/app.dart b/examples/hacker-news/app/lib/src/app.dart deleted file mode 100644 index 44213c7c..00000000 --- a/examples/hacker-news/app/lib/src/app.dart +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:app/src/config/theme_data.dart'; -import 'package:app/src/routes/index.dart'; -import 'package:app/src/utils/app_state_notifier.dart'; -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -class App extends StatelessWidget { - Widget build(BuildContext context) { - return Consumer(builder: (context, appState, child) { - return MaterialApp( - title: 'News!', - theme: ThemeConfig.lightTheme, - darkTheme: ThemeConfig.darkTheme, - themeMode: appState.isDarkMode ? ThemeMode.dark : ThemeMode.light, - onGenerateRoute: routes, - ); - }); - } -} diff --git a/examples/hacker-news/app/lib/src/config/color_constants.dart b/examples/hacker-news/app/lib/src/config/color_constants.dart deleted file mode 100644 index 77c1f519..00000000 --- a/examples/hacker-news/app/lib/src/config/color_constants.dart +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:flutter/material.dart'; - -Color hexToColor(String hex) { - assert(RegExp(r'^#([0-9a-fA-F]{6})|([0-9a-fA-F]{8})$').hasMatch(hex), - 'hex color must be #rrggbb or #rrggbbaa'); - - return Color( - int.parse(hex.substring(1), radix: 16) + - (hex.length == 7 ? 0xff000000 : 0x00000000), - ); -} - -class ColorConstants { - static Color lightScaffoldBackgroundColor = hexToColor('#F9F9F9'); - static Color darkScaffoldBackgroundColor = hexToColor('#2F2E2E'); - static Color secondaryAppColor = hexToColor('#5E92F3'); - static Color secondaryDarkAppColor = Colors.white; -} diff --git a/examples/hacker-news/app/lib/src/config/image_constants.dart b/examples/hacker-news/app/lib/src/config/image_constants.dart deleted file mode 100644 index e9a8cc01..00000000 --- a/examples/hacker-news/app/lib/src/config/image_constants.dart +++ /dev/null @@ -1,10 +0,0 @@ -class AllImages { - AllImages._(); - static AllImages _instance = AllImages._(); - factory AllImages() => _instance; - - String image = 'assets/image'; - String logo = 'assets/images/logo.png'; - String kDefaultImage = - 'https://cdn.pixabay.com/photo/2016/08/08/09/17/avatar-1577909_1280.png'; -} diff --git a/examples/hacker-news/app/lib/src/config/string_constants.dart b/examples/hacker-news/app/lib/src/config/string_constants.dart deleted file mode 100644 index 0c520eba..00000000 --- a/examples/hacker-news/app/lib/src/config/string_constants.dart +++ /dev/null @@ -1,15 +0,0 @@ -library constants; - -// Onboarding Screens -const String app_name = "APP NAME"; - -// tabs -const String tab0 = "Tab 0"; -const String tab1 = "Tab 1"; -const String tab2 = "Tab 2"; -const String tab3 = "Tab 3"; - -//Screen 1 -const String screen_util = "Screen"; -//home -const String app_bar_title = 'News'; diff --git a/examples/hacker-news/app/lib/src/routes/index.dart b/examples/hacker-news/app/lib/src/routes/index.dart deleted file mode 100644 index 5b2647bc..00000000 --- a/examples/hacker-news/app/lib/src/routes/index.dart +++ /dev/null @@ -1,18 +0,0 @@ -// routes for the app -import 'package:app/src/screens/home/index.dart'; -import 'package:app/src/screens/onboarding/authentication_screen.dart'; -import 'package:app/src/splash_screen.dart'; -import 'package:flutter/material.dart'; - -Route routes(RouteSettings settings) { - switch (settings.name) { - case '/': - return MaterialPageRoute(builder: (_) => SplashScreen()); - case '/home': - return MaterialPageRoute(builder: (_) => HomeScreen()); - case '/auth': - return MaterialPageRoute(builder: (_) => AuthenticationScreen()); - default: - return MaterialPageRoute(builder: (_) => SplashScreen()); - } -} diff --git a/examples/hacker-news/app/lib/src/screens/home/index.dart b/examples/hacker-news/app/lib/src/screens/home/index.dart deleted file mode 100644 index e6539147..00000000 --- a/examples/hacker-news/app/lib/src/screens/home/index.dart +++ /dev/null @@ -1,114 +0,0 @@ -// home screen contents -import 'package:app/src/config/image_constants.dart'; -import 'package:app/src/config/string_constants.dart' as string_constants; -import 'package:app/src/screens/news_screens/news_list.dart'; -import 'package:app/src/utils/app_state_notifier.dart'; -import 'package:app/src/widgets/cache_image_widget.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:provider/provider.dart'; -import 'package:shared/main.dart'; - -class HomeScreen extends StatelessWidget { - // ignore: close_sinks - final AuthenticationBloc authenticationBloc = - AuthenticationBlocController().authenticationBloc; - - @override - Widget build(BuildContext context) { - authenticationBloc.add(GetUserData()); - return WillPopScope( - onWillPop: () async => false, - child: BlocBuilder( - bloc: authenticationBloc, - builder: (BuildContext context, AuthenticationState state) { - if (state is SetUserData) { - return Scaffold( - appBar: AppBar( - centerTitle: true, - title: Text( - string_constants.app_bar_title, - style: Theme.of(context).appBarTheme.toolbarTextStyle, - ), - actions: [ - IconButton( - icon: Icon(Icons.logout), - onPressed: () { - authenticationBloc.add(UserLogOut()); - }), - ], - ), - body: StoriesProvider(child: NewsList()), - drawer: Drawer( - child: ListView( - padding: EdgeInsets.zero, - children: [ - DrawerHeader( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(50), - color: Colors.white), - child: CachedImage( - imageUrl: - state.currentUserData.data.avatar, - fit: BoxFit.fitWidth, - errorWidget: Image.network( - AllImages().kDefaultImage, - ), - width: 80, - height: 80, - placeholder: CircularProgressIndicator(), - ), - ), - Switch( - value: - Provider.of(context) - .isDarkMode, - onChanged: (value) { - Provider.of(context, - listen: false) - .updateTheme(value); - }, - ), - ], - ) - ], - ), - decoration: BoxDecoration( - color: Theme.of(context).dividerColor, - ), - ), - ListTile( - title: Text( - '${state.currentUserData.data.firstName} ${state.currentUserData.data.lastName}', - style: Theme.of(context).textTheme.bodyText2), - ), - ListTile( - title: Text(state.currentUserData.data.email, - style: Theme.of(context).textTheme.bodyText2), - ), - ListTile( - title: Text(state.currentUserData.ad.company, - style: Theme.of(context).textTheme.bodyText2), - ), - ], - ), - ), - ); - } - return Scaffold( - body: Center( - child: CircularProgressIndicator(), - ), - ); - })); - } -} diff --git a/examples/hacker-news/app/lib/src/screens/news_screens/news_details.dart b/examples/hacker-news/app/lib/src/screens/news_screens/news_details.dart deleted file mode 100644 index 641e42be..00000000 --- a/examples/hacker-news/app/lib/src/screens/news_screens/news_details.dart +++ /dev/null @@ -1,121 +0,0 @@ -import 'package:app/src/widgets/comment.dart'; -import 'package:app/src/widgets/web_view_details.dart'; -import 'package:flutter/material.dart'; -import 'package:shared/main.dart'; - -class NewsDetail extends StatefulWidget { - final int itemId; - - NewsDetail({this.itemId}); - - @override - _NewsDetailState createState() => _NewsDetailState(); -} - -class _NewsDetailState extends State - with SingleTickerProviderStateMixin { - bool isWebview = false; - AnimationController _animationController; - - Widget build(BuildContext context) { - final commentsBloc = CommentsProvider.of(context); - commentsBloc.fetchItemWithComments(widget.itemId); - return Scaffold( - body: buildBody(commentsBloc), - appBar: AppBar( - title: Text( - 'Detail', - style: Theme.of(context).appBarTheme.toolbarTextStyle, - ), - actions: [ - IconButton( - iconSize: 34, - splashColor: Colors.greenAccent, - icon: AnimatedIcon( - icon: AnimatedIcons.list_view, - progress: _animationController, - ), - onPressed: () => _handleOnPressed(), - ), - ], - ), - ); - } - - Widget buildBody(CommentsBloc commentsBloc) { - return StreamBuilder( - stream: commentsBloc.itemWithComments, - builder: - (context, AsyncSnapshot>> snapShot) { - if (!snapShot.hasData) { - return Text('Loading!'); - } - - final itemFuture = snapShot.data[widget.itemId]; - return FutureBuilder( - future: itemFuture, - builder: (context, AsyncSnapshot itemSnapShot) { - if (!itemSnapShot.hasData) { - return Text('No data!'); - } - return isWebview - ? WebViewDetails(url: itemSnapShot.data.url) - : buildList(itemSnapShot.data, snapShot.data); - }, - ); - }, - ); - } - - Widget buildList( - NewsItemModel item, Map> itemMap) { - final children = []; - children.add(buildTitle(item)); - final commentList = item.kids.map((kidsId) { - return Comment( - itemId: kidsId, - itemMap: itemMap, - dept: 0, - ); - }).toList(); - children.addAll(commentList); - - return ListView( - children: children, - ); - } - - Widget buildTitle(NewsItemModel item) { - return Container( - alignment: Alignment.topCenter, - margin: EdgeInsets.all(10.0), - child: Text( - item.title, - textAlign: TextAlign.center, - style: Theme.of(context).textTheme.bodyText2, - ), - ); - } - - @override - void dispose() { - super.dispose(); - _animationController.dispose(); - } - - @override - void initState() { - super.initState(); - _animationController = - AnimationController(vsync: this, duration: Duration(milliseconds: 450)); - } - - void _handleOnPressed() { - setState(() { - isWebview = !isWebview; - isWebview - ? _animationController.forward() - : _animationController.reverse(); - }); - } -} diff --git a/examples/hacker-news/app/lib/src/screens/news_screens/news_list.dart b/examples/hacker-news/app/lib/src/screens/news_screens/news_list.dart deleted file mode 100644 index 94044e24..00000000 --- a/examples/hacker-news/app/lib/src/screens/news_screens/news_list.dart +++ /dev/null @@ -1,35 +0,0 @@ -import 'package:app/src/widgets/news_list_tiles.dart'; -import 'package:app/src/widgets/refresh.dart'; -import 'package:flutter/material.dart'; -import 'package:shared/main.dart'; - -class NewsList extends StatelessWidget { - Widget build(BuildContext context) { - final storiesBloc = StoriesProvider.of(context); - storiesBloc.fetchTopIds(); - return topIdList(storiesBloc); - } - - Widget topIdList(StoriesBloc storiesBloc) { - return StreamBuilder( - stream: storiesBloc.topId, - builder: (BuildContext context, AsyncSnapshot> snapShot) { - if (!snapShot.hasData) { - return Center( - child: CircularProgressIndicator(), - ); - } - - return Refresh( - child: ListView.builder( - itemCount: snapShot.data.length, - itemBuilder: (BuildContext context, int index) { - storiesBloc.fetchItem(snapShot.data[index]); - return NewsListTile(itemId: snapShot.data[index]); - }, - ), - ); - }, - ); - } -} diff --git a/examples/hacker-news/app/lib/src/screens/onboarding/authentication_screen.dart b/examples/hacker-news/app/lib/src/screens/onboarding/authentication_screen.dart deleted file mode 100644 index 77326694..00000000 --- a/examples/hacker-news/app/lib/src/screens/onboarding/authentication_screen.dart +++ /dev/null @@ -1,129 +0,0 @@ -import 'package:app/src/screens/onboarding/login_screen.dart'; -import 'package:app/src/screens/onboarding/signup_screen.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:shared/main.dart'; - -class AuthenticationScreen extends StatefulWidget { - @override - _AuthenticationScreenState createState() => _AuthenticationScreenState(); -} - -class _AuthenticationScreenState extends State { - bool showLoginForm = false; - // ignore: close_sinks - AuthenticationBloc authenticationBloc; - @override - Widget build(BuildContext context) { - void _showError(String error) async { - await Fluttertoast.showToast( - msg: error, - toastLength: Toast.LENGTH_SHORT, - gravity: ToastGravity.BOTTOM, - timeInSecForIosWeb: 3, - backgroundColor: Colors.red, - textColor: Colors.white, - fontSize: 16.0); - } - - return Scaffold( - body: WillPopScope( - onWillPop: () async => false, - child: BlocListener( - bloc: authenticationBloc, - listener: (context, state) { - if (state is AuthenticationFailure) { - _showError(state.message); - } - }, - child: BlocBuilder( - bloc: authenticationBloc, - builder: (BuildContext context, AuthenticationState state) { - return SafeArea( - child: Stack( - children: [ - Center( - child: ListView( - shrinkWrap: true, - children: [ - Center( - child: Text( - showLoginForm ? 'LOGIN' : 'SIGN UP', - style: Theme.of(context).textTheme.headline2, - )), - Padding( - padding: const EdgeInsets.all(32.0), - child: showLoginForm - ? LoginForm( - authenticationBloc: authenticationBloc, - state: state, - ) - : SignUpForm( - authenticationBloc: authenticationBloc, - state: state, - ), - ), - showLoginForm - ? SizedBox() - : Padding( - padding: const EdgeInsets.all(32.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - SizedBox( - height: 38, - ), - Text('Already have an account?'), - SizedBox( - height: 8, - ), - ElevatedButton( - child: Text( - 'Login', - style: Theme.of(context) - .textTheme - .bodyText1, - ), - onPressed: () { - setState(() { - showLoginForm = true; - }); - }) - ], - ), - ) - ], - ), - ), - !showLoginForm - ? SizedBox() - : Positioned( - left: 6, - child: IconButton( - icon: Icon( - Icons.arrow_back_ios, - size: 32, - color: Theme.of(context).primaryColor, - ), - onPressed: () { - setState(() { - showLoginForm = false; - }); - }, - ), - ) - ], - ), - ); - }), - ), - )); - } - - @override - void initState() { - authenticationBloc = AuthenticationBlocController().authenticationBloc; - super.initState(); - } -} diff --git a/examples/hacker-news/app/lib/src/screens/onboarding/login_screen.dart b/examples/hacker-news/app/lib/src/screens/onboarding/login_screen.dart deleted file mode 100644 index d7a8d57b..00000000 --- a/examples/hacker-news/app/lib/src/screens/onboarding/login_screen.dart +++ /dev/null @@ -1,79 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:shared/main.dart'; - -class LoginForm extends StatefulWidget { - final AuthenticationBloc authenticationBloc; - final AuthenticationState state; - LoginForm({this.authenticationBloc, this.state}); - @override - _LoginFormState createState() => _LoginFormState(); -} - -class _LoginFormState extends State { - final GlobalKey _key = GlobalKey(); - final _passwordController = TextEditingController(); - final _emailController = TextEditingController(); - - @override - Widget build(BuildContext context) { - return Form( - key: _key, - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - TextFormField( - decoration: InputDecoration( - labelText: 'Email address', - filled: true, - isDense: true, - ), - controller: _emailController, - keyboardType: TextInputType.emailAddress, - autocorrect: false, - validator: (value) { - if (value.isEmpty) { - return 'Email is required.'; - } - return null; - }, - ), - SizedBox( - height: 12, - ), - TextFormField( - decoration: InputDecoration( - labelText: 'Password', - filled: true, - isDense: true, - ), - obscureText: true, - controller: _passwordController, - validator: (value) { - if (value.isEmpty) { - return 'Password is required.'; - } - return null; - }, - ), - const SizedBox( - height: 16, - ), - ElevatedButton( - child: widget.state is AuthenticationLoading - ? CircularProgressIndicator( - backgroundColor: - Theme.of(context).textTheme.bodyText1.color, - ) - : Text('Login', style: Theme.of(context).textTheme.bodyText1), - onPressed: () { - if (_key.currentState.validate()) { - widget.authenticationBloc.add(UserLogin( - email: _emailController.text, - password: _passwordController.text)); - } else {} - }) - ], - ), - ); - } -} diff --git a/examples/hacker-news/app/lib/src/screens/onboarding/signup_screen.dart b/examples/hacker-news/app/lib/src/screens/onboarding/signup_screen.dart deleted file mode 100644 index 03eaad47..00000000 --- a/examples/hacker-news/app/lib/src/screens/onboarding/signup_screen.dart +++ /dev/null @@ -1,84 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:shared/main.dart'; - -class SignUpForm extends StatefulWidget { - final AuthenticationBloc authenticationBloc; - final AuthenticationState state; - SignUpForm({this.authenticationBloc, this.state}); - @override - _SignUpFormState createState() => _SignUpFormState(); -} - -class _SignUpFormState extends State { - final GlobalKey _key = GlobalKey(); - final _passwordController = TextEditingController(); - final _emailController = TextEditingController(); - - @override - Widget build(BuildContext context) { - return Form( - key: _key, - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - TextFormField( - decoration: InputDecoration( - labelText: 'Email address', - filled: true, - isDense: true, - ), - controller: _emailController, - keyboardType: TextInputType.emailAddress, - autocorrect: false, - validator: (value) { - if (value.isEmpty) { - return 'Email is required.'; - } - return null; - }, - ), - SizedBox( - height: 12, - ), - TextFormField( - decoration: InputDecoration( - labelText: 'Password', - filled: true, - isDense: true, - ), - obscureText: true, - controller: _passwordController, - validator: (value) { - if (value.isEmpty) { - return 'Password is required.'; - } - return null; - }, - ), - const SizedBox( - height: 16, - ), - ElevatedButton( - child: widget.state is AuthenticationLoading - ? CircularProgressIndicator( - backgroundColor: - Theme.of(context).textTheme.bodyText1.color, - ) - : Text( - 'Sign Up', - style: Theme.of(context).textTheme.bodyText1, - ), - onPressed: () { - if (_key.currentState.validate()) { - widget.authenticationBloc.add(UserSignUp( - email: _emailController.text, - password: _passwordController.text)); - } else { - print('Form not validated'); - } - }) - ], - ), - ); - } -} diff --git a/examples/hacker-news/app/lib/src/splash_screen.dart b/examples/hacker-news/app/lib/src/splash_screen.dart deleted file mode 100644 index 83deeca2..00000000 --- a/examples/hacker-news/app/lib/src/splash_screen.dart +++ /dev/null @@ -1,45 +0,0 @@ -import 'package:app/src/config/color_constants.dart'; -import 'package:app/src/config/image_constants.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:shared/main.dart'; - -class SplashScreen extends StatefulWidget { - @override - _SplashScreenState createState() => _SplashScreenState(); -} - -class _SplashScreenState extends State { - AuthenticationBloc authenticationBloc; - @override - Widget build(BuildContext context) { - return Scaffold( - backgroundColor: ColorConstants.secondaryAppColor, - body: BlocListener( - bloc: authenticationBloc, - listener: (BuildContext context, AuthenticationState state) { - if (state is AppAutheticated) { - Navigator.pushNamed(context, '/home'); - } - if (state is AuthenticationStart) { - Navigator.pushNamed(context, '/auth'); - } - if (state is UserLogoutState) { - Navigator.pushNamed(context, '/auth'); - } - }, - child: BlocBuilder( - bloc: authenticationBloc, - builder: (BuildContext context, AuthenticationState state) { - return Center(child: Image.asset(AllImages().logo)); - }), - )); - } - - @override - void initState() { - authenticationBloc = AuthenticationBlocController().authenticationBloc; - authenticationBloc.add(AppLoadedup()); - super.initState(); - } -} diff --git a/examples/hacker-news/app/lib/src/utils/app_state_notifier.dart b/examples/hacker-news/app/lib/src/utils/app_state_notifier.dart deleted file mode 100644 index 1ddc68ec..00000000 --- a/examples/hacker-news/app/lib/src/utils/app_state_notifier.dart +++ /dev/null @@ -1,10 +0,0 @@ -import 'package:flutter/material.dart'; - -class AppStateNotifier extends ChangeNotifier { - bool isDarkMode = false; - - void updateTheme(bool isDarkMode) { - this.isDarkMode = isDarkMode; - notifyListeners(); - } -} diff --git a/examples/hacker-news/app/lib/src/utils/size_utils.dart b/examples/hacker-news/app/lib/src/utils/size_utils.dart deleted file mode 100644 index b46a5fc1..00000000 --- a/examples/hacker-news/app/lib/src/utils/size_utils.dart +++ /dev/null @@ -1,81 +0,0 @@ -import 'package:flutter/material.dart'; - -class SizeConfig { - SizeConfig._(); - static SizeConfig _instance = SizeConfig._(); - factory SizeConfig() => _instance; - - MediaQueryData _mediaQueryData; - double screenWidth; - double screenHeight; - double blockSizeHorizontal; - double blockSizeVertical; - double _safeAreaHorizontal; - double _safeAreaVertical; - double safeBlockHorizontal; - double safeBlockVertical; - double profileDrawerWidth; - double refHeight; - double refWidth; - - void init(BuildContext context) { - _mediaQueryData = MediaQuery.of(context); - screenWidth = _mediaQueryData.size.width; - screenHeight = _mediaQueryData.size.height; - refHeight = 1450; - refWidth = 670; - - if (screenHeight < 1200) { - blockSizeHorizontal = screenWidth / 100; - blockSizeVertical = screenHeight / 100; - - _safeAreaHorizontal = - _mediaQueryData.padding.left + _mediaQueryData.padding.right; - _safeAreaVertical = - _mediaQueryData.padding.top + _mediaQueryData.padding.bottom; - safeBlockHorizontal = (screenWidth - _safeAreaHorizontal) / 100; - safeBlockVertical = (screenHeight - _safeAreaVertical) / 100; - } else { - blockSizeHorizontal = screenWidth / 120; - blockSizeVertical = screenHeight / 120; - - _safeAreaHorizontal = - _mediaQueryData.padding.left + _mediaQueryData.padding.right; - _safeAreaVertical = - _mediaQueryData.padding.top + _mediaQueryData.padding.bottom; - safeBlockHorizontal = (screenWidth - _safeAreaHorizontal) / 120; - safeBlockVertical = (screenHeight - _safeAreaVertical) / 120; - } - } - - double getWidthRatio(double val) { - double res = (val / refWidth) * 100; - double temp = res * blockSizeHorizontal; - - return temp; - } - - double getHeightRatio(double val) { - double res = (val / refHeight) * 100; - double temp = res * blockSizeVertical; - return temp; - } - - double getFontRatio(double val) { - double res = (val / refWidth) * 100; - double temp = 0.0; - if (screenWidth < screenHeight) { - temp = res * safeBlockHorizontal; - } else { - temp = res * safeBlockVertical; - } - - return temp; - } -} - -extension SizeUtils on num { - double get toWidth => SizeConfig().getWidthRatio(this.toDouble()); - double get toHeight => SizeConfig().getHeightRatio(this.toDouble()); - double get toFont => SizeConfig().getFontRatio(this.toDouble()); -} diff --git a/examples/hacker-news/app/lib/src/widgets/cache_image_widget.dart b/examples/hacker-news/app/lib/src/widgets/cache_image_widget.dart deleted file mode 100644 index 022f17d1..00000000 --- a/examples/hacker-news/app/lib/src/widgets/cache_image_widget.dart +++ /dev/null @@ -1,35 +0,0 @@ -import 'package:cached_network_image/cached_network_image.dart'; -import 'package:flutter/material.dart'; - -class CachedImage extends StatelessWidget { - CachedImage({ - Key key, - @required this.imageUrl, - this.fit = BoxFit.cover, - this.height, - this.width, - this.placeholder, - this.errorWidget, - }) : assert(imageUrl != null), - super(key: key); - - final String imageUrl; - final BoxFit fit; - final double height; - final double width; - final Widget placeholder; - final Widget errorWidget; - - @override - Widget build(BuildContext context) { - return CachedNetworkImage( - imageUrl: imageUrl, - fit: fit, - height: height, - width: width, - placeholder: (context, url) => placeholder ?? CircularProgressIndicator(), - errorWidget: (context, url, err) => - errorWidget ?? Icon(Icons.error_outline), - ); - } -} diff --git a/examples/hacker-news/app/lib/src/widgets/comment.dart b/examples/hacker-news/app/lib/src/widgets/comment.dart deleted file mode 100644 index 193876d9..00000000 --- a/examples/hacker-news/app/lib/src/widgets/comment.dart +++ /dev/null @@ -1,65 +0,0 @@ -import 'dart:async'; -import 'package:flutter/material.dart'; -import 'package:shared/main.dart'; -import '../widgets/loading_container.dart'; - -class Comment extends StatelessWidget { - final int itemId; - final Map> itemMap; - final int dept; - - Comment({this.itemId, this.itemMap, this.dept}); - - Widget build(BuildContext context) { - return FutureBuilder( - future: itemMap[itemId], - builder: (context, AsyncSnapshot snapShot) { - if (!snapShot.hasData) { - return LoadingContainer(); - } - return buildComment(snapShot.data, context); - }, - ); - } - - Widget buildComment(NewsItemModel item, BuildContext context) { - final children = []; - children.add( - ListTile( - title: buildText(item, context), - subtitle: item.by == '' - ? Text('Deleted') - : Text( - item.by, - style: Theme.of(context).textTheme.bodyText2, - ), - contentPadding: EdgeInsets.only( - right: 16.0, - left: (dept + 1) * 16.0, - ), - ), - ); - children.add(Divider()); - item.kids.forEach((kidId) { - children.add(Comment( - itemId: kidId, - itemMap: itemMap, - dept: dept + 1, - )); - }); - return Column( - children: children, - ); - } - - Widget buildText(NewsItemModel item, BuildContext context) { - final text = item.text - .replaceAll(''', "'") - .replaceAll('

', '\n\n') - .replaceAll('

', ''); - return Text( - text, - style: Theme.of(context).textTheme.bodyText2, - ); - } -} diff --git a/examples/hacker-news/app/lib/src/widgets/loading_container.dart b/examples/hacker-news/app/lib/src/widgets/loading_container.dart deleted file mode 100644 index acc0570e..00000000 --- a/examples/hacker-news/app/lib/src/widgets/loading_container.dart +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:flutter/material.dart'; - -class LoadingContainer extends StatelessWidget{ - Widget build(BuildContext context){ - return Column( - children: [ - ListTile( - title: buildContainer(), - subtitle: buildContainer(), - ) - ], - ); - } - - Widget buildContainer(){ - return Container( - color: Colors.grey[200], - height: 24.0, - width: 150.0, - margin: EdgeInsets.only(top: 5.0,bottom: 5.0), - ); - } -} \ No newline at end of file diff --git a/examples/hacker-news/app/lib/src/widgets/news_list_tiles.dart b/examples/hacker-news/app/lib/src/widgets/news_list_tiles.dart deleted file mode 100644 index 0f0c8799..00000000 --- a/examples/hacker-news/app/lib/src/widgets/news_list_tiles.dart +++ /dev/null @@ -1,78 +0,0 @@ -import 'package:app/src/screens/news_screens/news_details.dart'; -import 'package:flutter/material.dart'; -import 'package:shared/main.dart'; - -import '../widgets/loading_container.dart'; - -class NewsListTile extends StatelessWidget { - final int itemId; - - NewsListTile({this.itemId}); - - Widget build(context) { - final bloc = StoriesProvider.of(context); - return StreamBuilder( - stream: bloc.items, - builder: (BuildContext context, - AsyncSnapshot>> snapShot) { - if (!snapShot.hasData) { - return LoadingContainer(); - } - - return FutureBuilder( - future: snapShot.data[itemId], - builder: (context, AsyncSnapshot itemShapShot) { - if (!itemShapShot.hasData) { - return LoadingContainer(); - } - return buildList(context, itemShapShot.data); - }, - ); - }, - ); - } - - Widget buildList(BuildContext context, NewsItemModel item) { - return Column( - children: [ - ListTile( - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (BuildContext context) => CommentsProvider( - child: NewsDetail( - itemId: item.id, - ), - ))); - }, - title: Text( - item.title, - style: Theme.of(context).textTheme.bodyText2, - ), - subtitle: Text( - '${item.score} points', - style: Theme.of(context).textTheme.bodyText2, - ), - trailing: Column( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Icon( - Icons.comment, - size: 24, - color: Theme.of(context).colorScheme.primary, - ), - Text( - '${item.descendants}', - style: Theme.of(context).textTheme.bodyText2, - ) - ], - ), - ), - Divider( - height: 10.0, - ) - ], - ); - } -} diff --git a/examples/hacker-news/app/lib/src/widgets/refresh.dart b/examples/hacker-news/app/lib/src/widgets/refresh.dart deleted file mode 100644 index 90e19217..00000000 --- a/examples/hacker-news/app/lib/src/widgets/refresh.dart +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:shared/main.dart'; - -class Refresh extends StatelessWidget { - final child; - - Refresh({this.child}); - - Widget build(context) { - final bloc = StoriesProvider.of(context); - - return RefreshIndicator( - child: child, - onRefresh: () async { - await bloc.clearCache(); - await bloc.fetchTopIds(); - }, - ); - } -} diff --git a/examples/hacker-news/app/lib/src/widgets/web_view_details.dart b/examples/hacker-news/app/lib/src/widgets/web_view_details.dart deleted file mode 100644 index 3890c160..00000000 --- a/examples/hacker-news/app/lib/src/widgets/web_view_details.dart +++ /dev/null @@ -1,50 +0,0 @@ -import 'dart:async'; -import 'package:flutter/material.dart'; -import 'package:webview_flutter/webview_flutter.dart'; - -class WebViewDetails extends StatefulWidget { - final String url; - WebViewDetails({this.url}); - @override - _WebViewDetailsState createState() => _WebViewDetailsState(); -} - -class _WebViewDetailsState extends State { - final Completer _controller = - Completer(); - - num _stackToView = 1; - - void _handleLoad(String value) { - setState(() { - _stackToView = 0; - }); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - body: IndexedStack( - index: _stackToView, - children: [ - Column( - children: [ - Expanded( - child: WebView( - initialUrl: widget.url, - javascriptMode: JavascriptMode.unrestricted, - onPageFinished: _handleLoad, - onWebViewCreated: (WebViewController webViewController) { - _controller.complete(webViewController); - }, - )), - ], - ), - Container( - child: Center( - child: CircularProgressIndicator(), - )), - ], - )); - } -} diff --git a/examples/hacker-news/app/linux/.gitignore b/examples/hacker-news/app/linux/.gitignore deleted file mode 100644 index d3896c98..00000000 --- a/examples/hacker-news/app/linux/.gitignore +++ /dev/null @@ -1 +0,0 @@ -flutter/ephemeral diff --git a/examples/hacker-news/app/linux/flutter/CMakeLists.txt b/examples/hacker-news/app/linux/flutter/CMakeLists.txt deleted file mode 100644 index 33fd5801..00000000 --- a/examples/hacker-news/app/linux/flutter/CMakeLists.txt +++ /dev/null @@ -1,87 +0,0 @@ -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/examples/hacker-news/app/linux/flutter/generated_plugin_registrant.cc b/examples/hacker-news/app/linux/flutter/generated_plugin_registrant.cc deleted file mode 100644 index e71a16d2..00000000 --- a/examples/hacker-news/app/linux/flutter/generated_plugin_registrant.cc +++ /dev/null @@ -1,11 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#include "generated_plugin_registrant.h" - - -void fl_register_plugins(FlPluginRegistry* registry) { -} diff --git a/examples/hacker-news/app/linux/flutter/generated_plugin_registrant.h b/examples/hacker-news/app/linux/flutter/generated_plugin_registrant.h deleted file mode 100644 index e0f0a47b..00000000 --- a/examples/hacker-news/app/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/examples/hacker-news/app/linux/flutter/generated_plugins.cmake b/examples/hacker-news/app/linux/flutter/generated_plugins.cmake deleted file mode 100644 index 51436ae8..00000000 --- a/examples/hacker-news/app/linux/flutter/generated_plugins.cmake +++ /dev/null @@ -1,15 +0,0 @@ -# -# Generated file, do not edit. -# - -list(APPEND FLUTTER_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) diff --git a/examples/hacker-news/app/linux/main.cc b/examples/hacker-news/app/linux/main.cc deleted file mode 100644 index e7c5c543..00000000 --- a/examples/hacker-news/app/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/examples/hacker-news/app/linux/my_application.cc b/examples/hacker-news/app/linux/my_application.cc deleted file mode 100644 index 42d9b08a..00000000 --- a/examples/hacker-news/app/linux/my_application.cc +++ /dev/null @@ -1,104 +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, "app"); - 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, "app"); - } - - 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 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_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/examples/hacker-news/app/linux/my_application.h b/examples/hacker-news/app/linux/my_application.h deleted file mode 100644 index 72271d5e..00000000 --- a/examples/hacker-news/app/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/examples/hacker-news/app/macos/.gitignore b/examples/hacker-news/app/macos/.gitignore deleted file mode 100644 index 746adbb6..00000000 --- a/examples/hacker-news/app/macos/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -# Flutter-related -**/Flutter/ephemeral/ -**/Pods/ - -# Xcode-related -**/dgph -**/xcuserdata/ diff --git a/examples/hacker-news/app/macos/Flutter/Flutter-Debug.xcconfig b/examples/hacker-news/app/macos/Flutter/Flutter-Debug.xcconfig deleted file mode 100644 index c2efd0b6..00000000 --- a/examples/hacker-news/app/macos/Flutter/Flutter-Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/examples/hacker-news/app/macos/Flutter/Flutter-Release.xcconfig b/examples/hacker-news/app/macos/Flutter/Flutter-Release.xcconfig deleted file mode 100644 index c2efd0b6..00000000 --- a/examples/hacker-news/app/macos/Flutter/Flutter-Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/examples/hacker-news/app/macos/Flutter/GeneratedPluginRegistrant.swift b/examples/hacker-news/app/macos/Flutter/GeneratedPluginRegistrant.swift deleted file mode 100644 index 081ceae9..00000000 --- a/examples/hacker-news/app/macos/Flutter/GeneratedPluginRegistrant.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// Generated file. Do not edit. -// - -import FlutterMacOS -import Foundation - -import connectivity_plus_macos -import path_provider_macos -import shared_preferences_macos -import sqflite - -func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { - ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin")) - PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) - SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) - SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) -} diff --git a/examples/hacker-news/app/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/hacker-news/app/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/examples/hacker-news/app/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/hacker-news/app/macos/Runner.xcworkspace/contents.xcworkspacedata b/examples/hacker-news/app/macos/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16..00000000 --- a/examples/hacker-news/app/macos/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/examples/hacker-news/app/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/hacker-news/app/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/examples/hacker-news/app/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/hacker-news/app/macos/Runner/AppDelegate.swift b/examples/hacker-news/app/macos/Runner/AppDelegate.swift deleted file mode 100644 index d53ef643..00000000 --- a/examples/hacker-news/app/macos/Runner/AppDelegate.swift +++ /dev/null @@ -1,9 +0,0 @@ -import Cocoa -import FlutterMacOS - -@NSApplicationMain -class AppDelegate: FlutterAppDelegate { - override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { - return true - } -} diff --git a/examples/hacker-news/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/hacker-news/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index a2ec33f1..00000000 --- a/examples/hacker-news/app/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/examples/hacker-news/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/examples/hacker-news/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png deleted file mode 100644 index 3c4935a7..00000000 Binary files a/examples/hacker-news/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png and /dev/null differ diff --git a/examples/hacker-news/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/examples/hacker-news/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png deleted file mode 100644 index ed4cc164..00000000 Binary files a/examples/hacker-news/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png and /dev/null differ diff --git a/examples/hacker-news/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/examples/hacker-news/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png deleted file mode 100644 index 483be613..00000000 Binary files a/examples/hacker-news/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png and /dev/null differ diff --git a/examples/hacker-news/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/examples/hacker-news/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png deleted file mode 100644 index bcbf36df..00000000 Binary files a/examples/hacker-news/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png and /dev/null differ diff --git a/examples/hacker-news/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/examples/hacker-news/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png deleted file mode 100644 index 9c0a6528..00000000 Binary files a/examples/hacker-news/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png and /dev/null differ diff --git a/examples/hacker-news/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/examples/hacker-news/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png deleted file mode 100644 index e71a7261..00000000 Binary files a/examples/hacker-news/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png and /dev/null differ diff --git a/examples/hacker-news/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/examples/hacker-news/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png deleted file mode 100644 index 8a31fe2d..00000000 Binary files a/examples/hacker-news/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png and /dev/null differ diff --git a/examples/hacker-news/app/macos/Runner/Base.lproj/MainMenu.xib b/examples/hacker-news/app/macos/Runner/Base.lproj/MainMenu.xib deleted file mode 100644 index 80e867a4..00000000 --- a/examples/hacker-news/app/macos/Runner/Base.lproj/MainMenu.xib +++ /dev/null @@ -1,343 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/hacker-news/app/macos/Runner/Configs/AppInfo.xcconfig b/examples/hacker-news/app/macos/Runner/Configs/AppInfo.xcconfig deleted file mode 100644 index 11e3faa7..00000000 --- a/examples/hacker-news/app/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 = app - -// The application's bundle identifier -PRODUCT_BUNDLE_IDENTIFIER = com.example.app - -// The copyright displayed in application information -PRODUCT_COPYRIGHT = Copyright © 2022 com.example. All rights reserved. diff --git a/examples/hacker-news/app/macos/Runner/Configs/Debug.xcconfig b/examples/hacker-news/app/macos/Runner/Configs/Debug.xcconfig deleted file mode 100644 index 36b0fd94..00000000 --- a/examples/hacker-news/app/macos/Runner/Configs/Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "../../Flutter/Flutter-Debug.xcconfig" -#include "Warnings.xcconfig" diff --git a/examples/hacker-news/app/macos/Runner/Configs/Release.xcconfig b/examples/hacker-news/app/macos/Runner/Configs/Release.xcconfig deleted file mode 100644 index dff4f495..00000000 --- a/examples/hacker-news/app/macos/Runner/Configs/Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "../../Flutter/Flutter-Release.xcconfig" -#include "Warnings.xcconfig" diff --git a/examples/hacker-news/app/macos/Runner/Configs/Warnings.xcconfig b/examples/hacker-news/app/macos/Runner/Configs/Warnings.xcconfig deleted file mode 100644 index 42bcbf47..00000000 --- a/examples/hacker-news/app/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/examples/hacker-news/app/macos/Runner/DebugProfile.entitlements b/examples/hacker-news/app/macos/Runner/DebugProfile.entitlements deleted file mode 100644 index dddb8a30..00000000 --- a/examples/hacker-news/app/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/examples/hacker-news/app/macos/Runner/Info.plist b/examples/hacker-news/app/macos/Runner/Info.plist deleted file mode 100644 index 4789daa6..00000000 --- a/examples/hacker-news/app/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/examples/hacker-news/app/macos/Runner/MainFlutterWindow.swift b/examples/hacker-news/app/macos/Runner/MainFlutterWindow.swift deleted file mode 100644 index 2722837e..00000000 --- a/examples/hacker-news/app/macos/Runner/MainFlutterWindow.swift +++ /dev/null @@ -1,15 +0,0 @@ -import Cocoa -import FlutterMacOS - -class MainFlutterWindow: NSWindow { - override func awakeFromNib() { - let flutterViewController = FlutterViewController.init() - let windowFrame = self.frame - self.contentViewController = flutterViewController - self.setFrame(windowFrame, display: true) - - RegisterGeneratedPlugins(registry: flutterViewController) - - super.awakeFromNib() - } -} diff --git a/examples/hacker-news/app/macos/Runner/Release.entitlements b/examples/hacker-news/app/macos/Runner/Release.entitlements deleted file mode 100644 index 852fa1a4..00000000 --- a/examples/hacker-news/app/macos/Runner/Release.entitlements +++ /dev/null @@ -1,8 +0,0 @@ - - - - - com.apple.security.app-sandbox - - - diff --git a/examples/hacker-news/app/pubspec.lock b/examples/hacker-news/app/pubspec.lock deleted file mode 100644 index 70b68280..00000000 --- a/examples/hacker-news/app/pubspec.lock +++ /dev/null @@ -1,726 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - api_sdk: - dependency: transitive - description: - path: "../api_sdk" - relative: true - source: path - version: "1.0.0+1" - archive: - dependency: transitive - description: - name: archive - url: "https://pub.dartlang.org" - source: hosted - version: "3.2.2" - args: - dependency: transitive - description: - name: args - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.0" - async: - dependency: transitive - description: - name: async - url: "https://pub.dartlang.org" - source: hosted - version: "2.8.2" - bloc: - dependency: "direct main" - description: - name: bloc - url: "https://pub.dartlang.org" - source: hosted - version: "8.0.3" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - cached_network_image: - dependency: "direct main" - description: - name: cached_network_image - url: "https://pub.dartlang.org" - source: hosted - version: "3.2.0" - cached_network_image_platform_interface: - dependency: transitive - description: - name: cached_network_image_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - cached_network_image_web: - dependency: transitive - description: - name: cached_network_image_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - characters: - dependency: transitive - description: - name: characters - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - clock: - dependency: transitive - description: - name: clock - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - collection: - dependency: transitive - description: - name: collection - url: "https://pub.dartlang.org" - source: hosted - version: "1.15.0" - connectivity_plus: - dependency: transitive - description: - name: connectivity_plus - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.1" - connectivity_plus_linux: - dependency: transitive - description: - name: connectivity_plus_linux - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - connectivity_plus_macos: - dependency: transitive - description: - name: connectivity_plus_macos - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.1" - connectivity_plus_platform_interface: - dependency: transitive - description: - name: connectivity_plus_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_web: - dependency: transitive - description: - name: connectivity_plus_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_windows: - dependency: transitive - description: - name: connectivity_plus_windows - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - crypto: - dependency: transitive - description: - name: crypto - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.4" - dbus: - dependency: transitive - description: - name: dbus - url: "https://pub.dartlang.org" - source: hosted - version: "0.7.1" - equatable: - dependency: "direct main" - description: - name: equatable - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - fake_async: - dependency: transitive - description: - name: fake_async - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - ffi: - dependency: transitive - description: - name: ffi - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.2" - file: - dependency: transitive - description: - name: file - url: "https://pub.dartlang.org" - source: hosted - version: "6.1.2" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_bloc: - dependency: "direct main" - description: - name: flutter_bloc - url: "https://pub.dartlang.org" - source: hosted - version: "8.0.1" - flutter_blurhash: - dependency: transitive - description: - name: flutter_blurhash - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.4" - flutter_cache_manager: - dependency: transitive - description: - name: flutter_cache_manager - url: "https://pub.dartlang.org" - source: hosted - version: "3.3.0" - flutter_native_splash: - dependency: "direct dev" - description: - name: flutter_native_splash - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - fluttertoast: - dependency: "direct main" - description: - name: fluttertoast - url: "https://pub.dartlang.org" - source: hosted - version: "8.0.9" - freezed_annotation: - dependency: transitive - description: - name: freezed_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - gql: - dependency: transitive - description: - name: gql - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.0" - gql_dedupe_link: - dependency: transitive - description: - name: gql_dedupe_link - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - gql_error_link: - dependency: transitive - description: - name: gql_error_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - gql_exec: - dependency: transitive - description: - name: gql_exec - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.0" - gql_http_link: - dependency: transitive - description: - name: gql_http_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.0" - gql_link: - dependency: transitive - description: - name: gql_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.0" - gql_transform_link: - dependency: transitive - description: - name: gql_transform_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - graphql: - dependency: transitive - description: - name: graphql - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.1" - graphql_flutter: - dependency: transitive - description: - name: graphql_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.1" - hive: - dependency: transitive - description: - name: hive - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - http: - dependency: transitive - description: - name: http - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.4" - http_parser: - dependency: transitive - description: - name: http_parser - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.0" - image: - dependency: transitive - description: - name: image - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.3" - js: - dependency: transitive - description: - name: js - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.3" - json_annotation: - dependency: transitive - description: - name: json_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "4.4.0" - matcher: - dependency: transitive - description: - name: matcher - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.11" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.3" - meta: - dependency: "direct main" - description: - name: meta - url: "https://pub.dartlang.org" - source: hosted - version: "1.7.0" - nested: - dependency: transitive - description: - name: nested - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - nm: - dependency: transitive - description: - name: nm - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.0" - normalize: - dependency: transitive - description: - name: normalize - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.0+1" - octo_image: - dependency: transitive - description: - name: octo_image - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - path: - dependency: transitive - description: - name: path - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0" - path_provider: - dependency: transitive - description: - name: path_provider - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.9" - path_provider_android: - dependency: transitive - description: - name: path_provider_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.12" - path_provider_ios: - dependency: transitive - description: - name: path_provider_ios - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.8" - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.5" - path_provider_macos: - dependency: transitive - description: - name: path_provider_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.dartlang.org" - source: hosted - version: "1.11.1" - petitparser: - dependency: transitive - description: - name: petitparser - url: "https://pub.dartlang.org" - source: hosted - version: "4.4.0" - platform: - dependency: transitive - description: - name: platform - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.2" - process: - dependency: transitive - description: - name: process - url: "https://pub.dartlang.org" - source: hosted - version: "4.2.4" - provider: - dependency: "direct main" - description: - name: provider - url: "https://pub.dartlang.org" - source: hosted - version: "6.0.2" - rxdart: - dependency: transitive - description: - name: rxdart - url: "https://pub.dartlang.org" - source: hosted - version: "0.27.3" - shared: - dependency: "direct main" - description: - path: "../shared" - relative: true - source: path - version: "1.0.0+1" - shared_preferences: - dependency: transitive - description: - name: shared_preferences - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.13" - shared_preferences_android: - dependency: transitive - description: - name: shared_preferences_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.11" - shared_preferences_ios: - dependency: transitive - description: - name: shared_preferences_ios - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - shared_preferences_linux: - dependency: transitive - description: - name: shared_preferences_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - shared_preferences_macos: - dependency: transitive - description: - name: shared_preferences_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - shared_preferences_platform_interface: - dependency: transitive - description: - name: shared_preferences_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - shared_preferences_web: - dependency: transitive - description: - name: shared_preferences_web - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - shared_preferences_windows: - dependency: transitive - description: - name: shared_preferences_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_span: - dependency: transitive - description: - name: source_span - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.1" - sqflite: - dependency: transitive - description: - name: sqflite - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.2" - sqflite_common: - dependency: transitive - description: - name: sqflite_common - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.1" - stack_trace: - dependency: transitive - description: - name: stack_trace - url: "https://pub.dartlang.org" - source: hosted - version: "1.10.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - synchronized: - dependency: transitive - description: - name: synchronized - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - test_api: - dependency: transitive - description: - name: test_api - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.8" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - universal_io: - dependency: transitive - description: - name: universal_io - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.4" - uuid: - dependency: transitive - description: - name: uuid - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.6" - vector_math: - dependency: transitive - description: - name: vector_math - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - webview_flutter: - dependency: "direct main" - description: - name: webview_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - webview_flutter_android: - dependency: transitive - description: - name: webview_flutter_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.8.3" - webview_flutter_platform_interface: - dependency: transitive - description: - name: webview_flutter_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.1" - webview_flutter_wkwebview: - dependency: transitive - description: - name: webview_flutter_wkwebview - url: "https://pub.dartlang.org" - source: hosted - version: "2.7.1" - win32: - dependency: transitive - description: - name: win32 - url: "https://pub.dartlang.org" - source: hosted - version: "2.4.2" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0+1" - xml: - dependency: transitive - description: - name: xml - url: "https://pub.dartlang.org" - source: hosted - version: "5.3.1" - yaml: - dependency: transitive - description: - name: yaml - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" -sdks: - dart: ">=2.16.0 <3.0.0" - flutter: ">=2.8.0" diff --git a/examples/hacker-news/app/pubspec.yaml b/examples/hacker-news/app/pubspec.yaml deleted file mode 100644 index aefb3aaf..00000000 --- a/examples/hacker-news/app/pubspec.yaml +++ /dev/null @@ -1,95 +0,0 @@ -name: app -description: A new Flutter project. - -# The following line prevents the package from being accidentally published to -# pub.dev using `flutter pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev - -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.0+1 - -environment: - sdk: ">=2.7.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.0 - provider: - webview_flutter: ^3.0.1 - flutter_bloc: ^8.0.1 - meta: ^1.1.6 - bloc: ^8.0.3 - equatable: ^2.0.3 - fluttertoast: ^8.0.9 - cached_network_image: ^3.2.0 - shared: - path: ../shared -dev_dependencies: - flutter_test: - sdk: flutter - flutter_native_splash: ^2.1.1 - -flutter_native_splash: - image: assets/images/logo.png - color: "5E92F3" - android_disable_fullscreen: true - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter. -flutter: - - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. - uses-material-design: true - - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - assets: - - assets/images/logo.png - - assets/images/2.0x/logo.png - - assets/images/3.0x/logo.png - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware. - - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/assets-and-images/#from-packages - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/custom-fonts/#from-packages - diff --git a/examples/hacker-news/app/web/favicon.png b/examples/hacker-news/app/web/favicon.png deleted file mode 100644 index 8aaa46ac..00000000 Binary files a/examples/hacker-news/app/web/favicon.png and /dev/null differ diff --git a/examples/hacker-news/app/web/icons/Icon-192.png b/examples/hacker-news/app/web/icons/Icon-192.png deleted file mode 100644 index b749bfef..00000000 Binary files a/examples/hacker-news/app/web/icons/Icon-192.png and /dev/null differ diff --git a/examples/hacker-news/app/web/icons/Icon-512.png b/examples/hacker-news/app/web/icons/Icon-512.png deleted file mode 100644 index 88cfd48d..00000000 Binary files a/examples/hacker-news/app/web/icons/Icon-512.png and /dev/null differ diff --git a/examples/hacker-news/app/web/icons/Icon-maskable-192.png b/examples/hacker-news/app/web/icons/Icon-maskable-192.png deleted file mode 100644 index eb9b4d76..00000000 Binary files a/examples/hacker-news/app/web/icons/Icon-maskable-192.png and /dev/null differ diff --git a/examples/hacker-news/app/web/icons/Icon-maskable-512.png b/examples/hacker-news/app/web/icons/Icon-maskable-512.png deleted file mode 100644 index d69c5669..00000000 Binary files a/examples/hacker-news/app/web/icons/Icon-maskable-512.png and /dev/null differ diff --git a/examples/hacker-news/app/web/index.html b/examples/hacker-news/app/web/index.html deleted file mode 100644 index 9a16f36c..00000000 --- a/examples/hacker-news/app/web/index.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - app - - - - - - - diff --git a/examples/hacker-news/app/windows/.gitignore b/examples/hacker-news/app/windows/.gitignore deleted file mode 100644 index d492d0d9..00000000 --- a/examples/hacker-news/app/windows/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -flutter/ephemeral/ - -# Visual Studio user-specific files. -*.suo -*.user -*.userosscache -*.sln.docstates - -# Visual Studio build-related files. -x64/ -x86/ - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ diff --git a/examples/hacker-news/app/windows/flutter/CMakeLists.txt b/examples/hacker-news/app/windows/flutter/CMakeLists.txt deleted file mode 100644 index b2e4bd8d..00000000 --- a/examples/hacker-news/app/windows/flutter/CMakeLists.txt +++ /dev/null @@ -1,103 +0,0 @@ -cmake_minimum_required(VERSION 3.14) - -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. -set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") - -# === Flutter Library === -set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") - -# 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/windows/app.so" PARENT_SCOPE) - -list(APPEND FLUTTER_LIBRARY_HEADERS - "flutter_export.h" - "flutter_windows.h" - "flutter_messenger.h" - "flutter_plugin_registrar.h" - "flutter_texture_registrar.h" -) -list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") -add_library(flutter INTERFACE) -target_include_directories(flutter INTERFACE - "${EPHEMERAL_DIR}" -) -target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") -add_dependencies(flutter flutter_assemble) - -# === Wrapper === -list(APPEND CPP_WRAPPER_SOURCES_CORE - "core_implementations.cc" - "standard_codec.cc" -) -list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") -list(APPEND CPP_WRAPPER_SOURCES_PLUGIN - "plugin_registrar.cc" -) -list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") -list(APPEND CPP_WRAPPER_SOURCES_APP - "flutter_engine.cc" - "flutter_view_controller.cc" -) -list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") - -# Wrapper sources needed for a plugin. -add_library(flutter_wrapper_plugin STATIC - ${CPP_WRAPPER_SOURCES_CORE} - ${CPP_WRAPPER_SOURCES_PLUGIN} -) -apply_standard_settings(flutter_wrapper_plugin) -set_target_properties(flutter_wrapper_plugin PROPERTIES - POSITION_INDEPENDENT_CODE ON) -set_target_properties(flutter_wrapper_plugin PROPERTIES - CXX_VISIBILITY_PRESET hidden) -target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) -target_include_directories(flutter_wrapper_plugin PUBLIC - "${WRAPPER_ROOT}/include" -) -add_dependencies(flutter_wrapper_plugin flutter_assemble) - -# Wrapper sources needed for the runner. -add_library(flutter_wrapper_app STATIC - ${CPP_WRAPPER_SOURCES_CORE} - ${CPP_WRAPPER_SOURCES_APP} -) -apply_standard_settings(flutter_wrapper_app) -target_link_libraries(flutter_wrapper_app PUBLIC flutter) -target_include_directories(flutter_wrapper_app PUBLIC - "${WRAPPER_ROOT}/include" -) -add_dependencies(flutter_wrapper_app 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. -set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") -set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) -add_custom_command( - OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} - ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} - ${CPP_WRAPPER_SOURCES_APP} - ${PHONY_OUTPUT} - COMMAND ${CMAKE_COMMAND} -E env - ${FLUTTER_TOOL_ENVIRONMENT} - "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" - windows-x64 $ - VERBATIM -) -add_custom_target(flutter_assemble DEPENDS - "${FLUTTER_LIBRARY}" - ${FLUTTER_LIBRARY_HEADERS} - ${CPP_WRAPPER_SOURCES_CORE} - ${CPP_WRAPPER_SOURCES_PLUGIN} - ${CPP_WRAPPER_SOURCES_APP} -) diff --git a/examples/hacker-news/app/windows/flutter/generated_plugin_registrant.cc b/examples/hacker-news/app/windows/flutter/generated_plugin_registrant.cc deleted file mode 100644 index 8083d749..00000000 --- a/examples/hacker-news/app/windows/flutter/generated_plugin_registrant.cc +++ /dev/null @@ -1,14 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#include "generated_plugin_registrant.h" - -#include - -void RegisterPlugins(flutter::PluginRegistry* registry) { - ConnectivityPlusWindowsPluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin")); -} diff --git a/examples/hacker-news/app/windows/flutter/generated_plugin_registrant.h b/examples/hacker-news/app/windows/flutter/generated_plugin_registrant.h deleted file mode 100644 index dc139d85..00000000 --- a/examples/hacker-news/app/windows/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 RegisterPlugins(flutter::PluginRegistry* registry); - -#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/examples/hacker-news/app/windows/runner/CMakeLists.txt b/examples/hacker-news/app/windows/runner/CMakeLists.txt deleted file mode 100644 index de2d8916..00000000 --- a/examples/hacker-news/app/windows/runner/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -cmake_minimum_required(VERSION 3.14) -project(runner LANGUAGES CXX) - -add_executable(${BINARY_NAME} WIN32 - "flutter_window.cpp" - "main.cpp" - "utils.cpp" - "win32_window.cpp" - "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" - "Runner.rc" - "runner.exe.manifest" -) -apply_standard_settings(${BINARY_NAME}) -target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") -target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) -target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") -add_dependencies(${BINARY_NAME} flutter_assemble) diff --git a/examples/hacker-news/app/windows/runner/flutter_window.cpp b/examples/hacker-news/app/windows/runner/flutter_window.cpp deleted file mode 100644 index b43b9095..00000000 --- a/examples/hacker-news/app/windows/runner/flutter_window.cpp +++ /dev/null @@ -1,61 +0,0 @@ -#include "flutter_window.h" - -#include - -#include "flutter/generated_plugin_registrant.h" - -FlutterWindow::FlutterWindow(const flutter::DartProject& project) - : project_(project) {} - -FlutterWindow::~FlutterWindow() {} - -bool FlutterWindow::OnCreate() { - if (!Win32Window::OnCreate()) { - return false; - } - - RECT frame = GetClientArea(); - - // The size here must match the window dimensions to avoid unnecessary surface - // creation / destruction in the startup path. - flutter_controller_ = std::make_unique( - frame.right - frame.left, frame.bottom - frame.top, project_); - // Ensure that basic setup of the controller was successful. - if (!flutter_controller_->engine() || !flutter_controller_->view()) { - return false; - } - RegisterPlugins(flutter_controller_->engine()); - SetChildContent(flutter_controller_->view()->GetNativeWindow()); - return true; -} - -void FlutterWindow::OnDestroy() { - if (flutter_controller_) { - flutter_controller_ = nullptr; - } - - Win32Window::OnDestroy(); -} - -LRESULT -FlutterWindow::MessageHandler(HWND hwnd, UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept { - // Give Flutter, including plugins, an opportunity to handle window messages. - if (flutter_controller_) { - std::optional result = - flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, - lparam); - if (result) { - return *result; - } - } - - switch (message) { - case WM_FONTCHANGE: - flutter_controller_->engine()->ReloadSystemFonts(); - break; - } - - return Win32Window::MessageHandler(hwnd, message, wparam, lparam); -} diff --git a/examples/hacker-news/app/windows/runner/flutter_window.h b/examples/hacker-news/app/windows/runner/flutter_window.h deleted file mode 100644 index 6da0652f..00000000 --- a/examples/hacker-news/app/windows/runner/flutter_window.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef RUNNER_FLUTTER_WINDOW_H_ -#define RUNNER_FLUTTER_WINDOW_H_ - -#include -#include - -#include - -#include "win32_window.h" - -// A window that does nothing but host a Flutter view. -class FlutterWindow : public Win32Window { - public: - // Creates a new FlutterWindow hosting a Flutter view running |project|. - explicit FlutterWindow(const flutter::DartProject& project); - virtual ~FlutterWindow(); - - protected: - // Win32Window: - bool OnCreate() override; - void OnDestroy() override; - LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, - LPARAM const lparam) noexcept override; - - private: - // The project to run. - flutter::DartProject project_; - - // The Flutter instance hosted by this window. - std::unique_ptr flutter_controller_; -}; - -#endif // RUNNER_FLUTTER_WINDOW_H_ diff --git a/examples/hacker-news/app/windows/runner/resource.h b/examples/hacker-news/app/windows/runner/resource.h deleted file mode 100644 index 66a65d1e..00000000 --- a/examples/hacker-news/app/windows/runner/resource.h +++ /dev/null @@ -1,16 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by Runner.rc -// -#define IDI_APP_ICON 101 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 102 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1001 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/examples/hacker-news/app/windows/runner/resources/app_icon.ico b/examples/hacker-news/app/windows/runner/resources/app_icon.ico deleted file mode 100644 index c04e20ca..00000000 Binary files a/examples/hacker-news/app/windows/runner/resources/app_icon.ico and /dev/null differ diff --git a/examples/hacker-news/app/windows/runner/runner.exe.manifest b/examples/hacker-news/app/windows/runner/runner.exe.manifest deleted file mode 100644 index c977c4a4..00000000 --- a/examples/hacker-news/app/windows/runner/runner.exe.manifest +++ /dev/null @@ -1,20 +0,0 @@ - - - - - PerMonitorV2 - - - - - - - - - - - - - - - diff --git a/examples/hacker-news/app/windows/runner/utils.h b/examples/hacker-news/app/windows/runner/utils.h deleted file mode 100644 index 3879d547..00000000 --- a/examples/hacker-news/app/windows/runner/utils.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef RUNNER_UTILS_H_ -#define RUNNER_UTILS_H_ - -#include -#include - -// Creates a console for the process, and redirects stdout and stderr to -// it for both the runner and the Flutter library. -void CreateAndAttachConsole(); - -// Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string -// encoded in UTF-8. Returns an empty std::string on failure. -std::string Utf8FromUtf16(const wchar_t* utf16_string); - -// Gets the command line arguments passed in as a std::vector, -// encoded in UTF-8. Returns an empty std::vector on failure. -std::vector GetCommandLineArguments(); - -#endif // RUNNER_UTILS_H_ diff --git a/examples/hacker-news/app/windows/runner/win32_window.cpp b/examples/hacker-news/app/windows/runner/win32_window.cpp deleted file mode 100644 index c10f08dc..00000000 --- a/examples/hacker-news/app/windows/runner/win32_window.cpp +++ /dev/null @@ -1,245 +0,0 @@ -#include "win32_window.h" - -#include - -#include "resource.h" - -namespace { - -constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; - -// The number of Win32Window objects that currently exist. -static int g_active_window_count = 0; - -using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd); - -// Scale helper to convert logical scaler values to physical using passed in -// scale factor -int Scale(int source, double scale_factor) { - return static_cast(source * scale_factor); -} - -// Dynamically loads the |EnableNonClientDpiScaling| from the User32 module. -// This API is only needed for PerMonitor V1 awareness mode. -void EnableFullDpiSupportIfAvailable(HWND hwnd) { - HMODULE user32_module = LoadLibraryA("User32.dll"); - if (!user32_module) { - return; - } - auto enable_non_client_dpi_scaling = - reinterpret_cast( - GetProcAddress(user32_module, "EnableNonClientDpiScaling")); - if (enable_non_client_dpi_scaling != nullptr) { - enable_non_client_dpi_scaling(hwnd); - FreeLibrary(user32_module); - } -} - -} // namespace - -// Manages the Win32Window's window class registration. -class WindowClassRegistrar { - public: - ~WindowClassRegistrar() = default; - - // Returns the singleton registar instance. - static WindowClassRegistrar* GetInstance() { - if (!instance_) { - instance_ = new WindowClassRegistrar(); - } - return instance_; - } - - // Returns the name of the window class, registering the class if it hasn't - // previously been registered. - const wchar_t* GetWindowClass(); - - // Unregisters the window class. Should only be called if there are no - // instances of the window. - void UnregisterWindowClass(); - - private: - WindowClassRegistrar() = default; - - static WindowClassRegistrar* instance_; - - bool class_registered_ = false; -}; - -WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr; - -const wchar_t* WindowClassRegistrar::GetWindowClass() { - if (!class_registered_) { - WNDCLASS window_class{}; - window_class.hCursor = LoadCursor(nullptr, IDC_ARROW); - window_class.lpszClassName = kWindowClassName; - window_class.style = CS_HREDRAW | CS_VREDRAW; - window_class.cbClsExtra = 0; - window_class.cbWndExtra = 0; - window_class.hInstance = GetModuleHandle(nullptr); - window_class.hIcon = - LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); - window_class.hbrBackground = 0; - window_class.lpszMenuName = nullptr; - window_class.lpfnWndProc = Win32Window::WndProc; - RegisterClass(&window_class); - class_registered_ = true; - } - return kWindowClassName; -} - -void WindowClassRegistrar::UnregisterWindowClass() { - UnregisterClass(kWindowClassName, nullptr); - class_registered_ = false; -} - -Win32Window::Win32Window() { - ++g_active_window_count; -} - -Win32Window::~Win32Window() { - --g_active_window_count; - Destroy(); -} - -bool Win32Window::CreateAndShow(const std::wstring& title, - const Point& origin, - const Size& size) { - Destroy(); - - const wchar_t* window_class = - WindowClassRegistrar::GetInstance()->GetWindowClass(); - - const POINT target_point = {static_cast(origin.x), - static_cast(origin.y)}; - HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); - UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); - double scale_factor = dpi / 96.0; - - HWND window = CreateWindow( - window_class, title.c_str(), WS_OVERLAPPEDWINDOW | WS_VISIBLE, - Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), - Scale(size.width, scale_factor), Scale(size.height, scale_factor), - nullptr, nullptr, GetModuleHandle(nullptr), this); - - if (!window) { - return false; - } - - return OnCreate(); -} - -// static -LRESULT CALLBACK Win32Window::WndProc(HWND const window, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept { - if (message == WM_NCCREATE) { - auto window_struct = reinterpret_cast(lparam); - SetWindowLongPtr(window, GWLP_USERDATA, - reinterpret_cast(window_struct->lpCreateParams)); - - auto that = static_cast(window_struct->lpCreateParams); - EnableFullDpiSupportIfAvailable(window); - that->window_handle_ = window; - } else if (Win32Window* that = GetThisFromHandle(window)) { - return that->MessageHandler(window, message, wparam, lparam); - } - - return DefWindowProc(window, message, wparam, lparam); -} - -LRESULT -Win32Window::MessageHandler(HWND hwnd, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept { - switch (message) { - case WM_DESTROY: - window_handle_ = nullptr; - Destroy(); - if (quit_on_close_) { - PostQuitMessage(0); - } - return 0; - - case WM_DPICHANGED: { - auto newRectSize = reinterpret_cast(lparam); - LONG newWidth = newRectSize->right - newRectSize->left; - LONG newHeight = newRectSize->bottom - newRectSize->top; - - SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth, - newHeight, SWP_NOZORDER | SWP_NOACTIVATE); - - return 0; - } - case WM_SIZE: { - RECT rect = GetClientArea(); - if (child_content_ != nullptr) { - // Size and position the child window. - MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, - rect.bottom - rect.top, TRUE); - } - return 0; - } - - case WM_ACTIVATE: - if (child_content_ != nullptr) { - SetFocus(child_content_); - } - return 0; - } - - return DefWindowProc(window_handle_, message, wparam, lparam); -} - -void Win32Window::Destroy() { - OnDestroy(); - - if (window_handle_) { - DestroyWindow(window_handle_); - window_handle_ = nullptr; - } - if (g_active_window_count == 0) { - WindowClassRegistrar::GetInstance()->UnregisterWindowClass(); - } -} - -Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { - return reinterpret_cast( - GetWindowLongPtr(window, GWLP_USERDATA)); -} - -void Win32Window::SetChildContent(HWND content) { - child_content_ = content; - SetParent(content, window_handle_); - RECT frame = GetClientArea(); - - MoveWindow(content, frame.left, frame.top, frame.right - frame.left, - frame.bottom - frame.top, true); - - SetFocus(child_content_); -} - -RECT Win32Window::GetClientArea() { - RECT frame; - GetClientRect(window_handle_, &frame); - return frame; -} - -HWND Win32Window::GetHandle() { - return window_handle_; -} - -void Win32Window::SetQuitOnClose(bool quit_on_close) { - quit_on_close_ = quit_on_close; -} - -bool Win32Window::OnCreate() { - // No-op; provided for subclasses. - return true; -} - -void Win32Window::OnDestroy() { - // No-op; provided for subclasses. -} diff --git a/examples/hacker-news/app/windows/runner/win32_window.h b/examples/hacker-news/app/windows/runner/win32_window.h deleted file mode 100644 index 17ba4311..00000000 --- a/examples/hacker-news/app/windows/runner/win32_window.h +++ /dev/null @@ -1,98 +0,0 @@ -#ifndef RUNNER_WIN32_WINDOW_H_ -#define RUNNER_WIN32_WINDOW_H_ - -#include - -#include -#include -#include - -// A class abstraction for a high DPI-aware Win32 Window. Intended to be -// inherited from by classes that wish to specialize with custom -// rendering and input handling -class Win32Window { - public: - struct Point { - unsigned int x; - unsigned int y; - Point(unsigned int x, unsigned int y) : x(x), y(y) {} - }; - - struct Size { - unsigned int width; - unsigned int height; - Size(unsigned int width, unsigned int height) - : width(width), height(height) {} - }; - - Win32Window(); - virtual ~Win32Window(); - - // Creates and shows a win32 window with |title| and position and size using - // |origin| and |size|. New windows are created on the default monitor. Window - // sizes are specified to the OS in physical pixels, hence to ensure a - // consistent size to will treat the width height passed in to this function - // as logical pixels and scale to appropriate for the default monitor. Returns - // true if the window was created successfully. - bool CreateAndShow(const std::wstring& title, - const Point& origin, - const Size& size); - - // Release OS resources associated with window. - void Destroy(); - - // Inserts |content| into the window tree. - void SetChildContent(HWND content); - - // Returns the backing Window handle to enable clients to set icon and other - // window properties. Returns nullptr if the window has been destroyed. - HWND GetHandle(); - - // If true, closing this window will quit the application. - void SetQuitOnClose(bool quit_on_close); - - // Return a RECT representing the bounds of the current client area. - RECT GetClientArea(); - - protected: - // Processes and route salient window messages for mouse handling, - // size change and DPI. Delegates handling of these to member overloads that - // inheriting classes can handle. - virtual LRESULT MessageHandler(HWND window, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept; - - // Called when CreateAndShow is called, allowing subclass window-related - // setup. Subclasses should return false if setup fails. - virtual bool OnCreate(); - - // Called when Destroy is called. - virtual void OnDestroy(); - - private: - friend class WindowClassRegistrar; - - // OS callback called by message pump. Handles the WM_NCCREATE message which - // is passed when the non-client area is being created and enables automatic - // non-client DPI scaling so that the non-client area automatically - // responsponds to changes in DPI. All other messages are handled by - // MessageHandler. - static LRESULT CALLBACK WndProc(HWND const window, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept; - - // Retrieves a class instance pointer for |window| - static Win32Window* GetThisFromHandle(HWND const window) noexcept; - - bool quit_on_close_ = false; - - // window handle for top level window. - HWND window_handle_ = nullptr; - - // window handle for hosted content. - HWND child_content_ = nullptr; -}; - -#endif // RUNNER_WIN32_WINDOW_H_ diff --git a/examples/hacker-news/clean_project.sh b/examples/hacker-news/clean_project.sh deleted file mode 100644 index d900326a..00000000 --- a/examples/hacker-news/clean_project.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -cd api_sdk -echo "+++++API SDK pub clean+++++" -flutter clean -echo "+++++API SDK done+++++" - - -cd ../shared -echo "+++++Shared pub clean+++++" -flutter clean -echo "+++++Shared done+++++" - -cd ../app -echo "+++++Main app pub clean+++++" -flutter clean -echo "+++++Cleaning done+++++" \ No newline at end of file diff --git a/examples/hacker-news/hacker_news.gif b/examples/hacker-news/hacker_news.gif deleted file mode 100644 index f424ab65..00000000 Binary files a/examples/hacker-news/hacker_news.gif and /dev/null differ diff --git a/examples/hacker-news/run_script.sh b/examples/hacker-news/run_script.sh deleted file mode 100644 index 9f269a83..00000000 --- a/examples/hacker-news/run_script.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -cd api_sdk -echo "+++++API SDK pub clean+++++" -flutter clean -echo "+++++API SDK pub get+++++" -flutter pub get -echo "+++++API SDK done+++++" - - -cd ../shared -echo "+++++Shared pub clean+++++" -flutter clean -echo "+++++Shared pub get+++++" -flutter pub get -echo "+++++Shared done+++++" - -cd ../app -echo "+++++Main app pub clean+++++" -flutter clean -echo "+++++Main app pub get+++++" -flutter pub get -echo "+++++Main app run+++++" -flutter run \ No newline at end of file diff --git a/examples/hacker-news/shared/.gitignore b/examples/hacker-news/shared/.gitignore deleted file mode 100644 index 9d532b18..00000000 --- a/examples/hacker-news/shared/.gitignore +++ /dev/null @@ -1,41 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json diff --git a/examples/hacker-news/shared/.metadata b/examples/hacker-news/shared/.metadata deleted file mode 100644 index 107fcb7b..00000000 --- a/examples/hacker-news/shared/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 8874f21e79d7ec66d0457c7ab338348e31b17f1d - channel: stable - -project_type: app diff --git a/examples/hacker-news/shared/README.md b/examples/hacker-news/shared/README.md deleted file mode 100644 index 25946365..00000000 --- a/examples/hacker-news/shared/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# shared - -A new Flutter project. - -## Getting Started - -This project is a starting point for a Flutter application. - -A few resources to get you started if this is your first Flutter project: - -- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) - -For help getting started with Flutter, view our -[online documentation](https://flutter.dev/docs), which offers tutorials, -samples, guidance on mobile development, and a full API reference. diff --git a/examples/hacker-news/shared/lib/main.dart b/examples/hacker-news/shared/lib/main.dart deleted file mode 100644 index fc1cf272..00000000 --- a/examples/hacker-news/shared/lib/main.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'package:shared_preferences/shared_preferences.dart'; - -export 'package:shared/modules/authentication/auth.dart'; -export 'package:shared/modules/authentication/bloc/bloc_controller.dart'; -export 'package:shared/modules/hacker_news/bloc/comment_provider.dart'; -export 'package:shared/modules/hacker_news/bloc/comments_bloc.dart'; -export 'package:shared/modules/hacker_news/bloc/stories_bloc.dart'; -export 'package:shared/modules/hacker_news/bloc/stories_provider.dart'; -export 'package:shared/modules/hacker_news/models/news_models_public.dart'; - -Future prefs = SharedPreferences.getInstance(); diff --git a/examples/hacker-news/shared/lib/modules/authentication/auth.dart b/examples/hacker-news/shared/lib/modules/authentication/auth.dart deleted file mode 100644 index 662c0eb7..00000000 --- a/examples/hacker-news/shared/lib/modules/authentication/auth.dart +++ /dev/null @@ -1,4 +0,0 @@ -export 'package:shared/modules/authentication/bloc/authentication/authentication_bloc_public.dart'; -export 'package:shared/modules/authentication/models/auth_models_public.dart'; -export 'package:shared/modules/authentication/models/firebase_user.dart'; -export 'package:shared/modules/authentication/resources/authentication_repository.dart'; diff --git a/examples/hacker-news/shared/lib/modules/authentication/bloc/authentication/authentication_bloc.dart b/examples/hacker-news/shared/lib/modules/authentication/bloc/authentication/authentication_bloc.dart deleted file mode 100644 index 028c91f7..00000000 --- a/examples/hacker-news/shared/lib/modules/authentication/bloc/authentication/authentication_bloc.dart +++ /dev/null @@ -1,95 +0,0 @@ -import 'package:bloc/bloc.dart'; -import 'package:shared/main.dart'; -import 'package:shared_preferences/shared_preferences.dart'; - -class AuthenticationBloc - extends Bloc { - final AuthenticationRepository authenticationService = - AuthenticationRepository(); - AuthenticationBloc() : super(AuthenticationInitial()) { - on(_mapAppSignUpLoadedState); - on(_mapUserSignupToState); - on(_mapUserLoginState); - on((event, emit) async { - final SharedPreferences sharedPreferences = await prefs; - sharedPreferences.clear(); - emit(UserLogoutState()); - }); - on((event, emit) async { - final SharedPreferences sharedPreferences = await prefs; - int currentUserId = sharedPreferences.getInt('userId'); - final data = await authenticationService.getUserData(currentUserId ?? 4); - final currentUserData = CurrentUserData.fromJson(data); - emit(SetUserData(currentUserData: currentUserData)); - }); - } - - void _mapAppSignUpLoadedState( - AppLoadedup event, Emitter emit) async { - AuthenticationLoading(); - try { - await Future.delayed(Duration(milliseconds: 500)); // a simulated delay - final SharedPreferences sharedPreferences = await prefs; - if (sharedPreferences.getString('authtoken') != null) { - emit(AppAutheticated()); - } else { - emit(AuthenticationStart()); - } - } catch (e) { - emit(AuthenticationFailure( - message: e.message ?? 'An unknown error occurred')); - } - } - - void _mapUserLoginState( - UserLogin event, Emitter emit) async { - final SharedPreferences sharedPreferences = await prefs; - emit(AuthenticationLoading()); - try { - await Future.delayed(Duration(milliseconds: 500)); // a simulated delay - final data = await authenticationService.loginWithEmailAndPassword( - event.email, event.password); - if (data["error"] == null) { - final currentUser = Token.fromJson(data); - if (currentUser != null) { - sharedPreferences.setString('authtoken', currentUser.token); - emit(AppAutheticated()); - } else { - emit(AuthenticationNotAuthenticated()); - } - } else { - emit(AuthenticationFailure(message: data["error"])); - } - } catch (e) { - emit(AuthenticationFailure( - message: e.toString() ?? 'An unknown error occurred')); - } - } - - void _mapUserSignupToState( - UserSignUp event, Emitter emit) async { - final SharedPreferences sharedPreferences = await prefs; - emit(AuthenticationLoading()); - try { - await Future.delayed(Duration(milliseconds: 500)); // a simulated delay - final data = await authenticationService.signUpWithEmailAndPassword( - event.email, event.password); - - if (data["error"] == null) { - final currentUser = UserData.fromJson(data); - if (currentUser != null) { - sharedPreferences.setString('authtoken', currentUser.token); - sharedPreferences.setInt('userId', currentUser.id); - emit(AppAutheticated()); - } else { - emit(AuthenticationNotAuthenticated()); - } - } else { - emit(AuthenticationFailure(message: data["error"])); - } - } catch (e) { - emit(AuthenticationFailure( - message: e.toString() ?? 'An unknown error occurred')); - } - } -} diff --git a/examples/hacker-news/shared/lib/modules/authentication/bloc/authentication/authentication_bloc_public.dart b/examples/hacker-news/shared/lib/modules/authentication/bloc/authentication/authentication_bloc_public.dart deleted file mode 100644 index 4ebb9f73..00000000 --- a/examples/hacker-news/shared/lib/modules/authentication/bloc/authentication/authentication_bloc_public.dart +++ /dev/null @@ -1,3 +0,0 @@ -export 'package:shared/modules/authentication/bloc/authentication/authentication_bloc.dart'; -export 'package:shared/modules/authentication/bloc/authentication/authentication_event.dart'; -export 'package:shared/modules/authentication/bloc/authentication/authentication_state.dart'; diff --git a/examples/hacker-news/shared/lib/modules/authentication/bloc/authentication/authentication_event.dart b/examples/hacker-news/shared/lib/modules/authentication/bloc/authentication/authentication_event.dart deleted file mode 100644 index d6f7a93f..00000000 --- a/examples/hacker-news/shared/lib/modules/authentication/bloc/authentication/authentication_event.dart +++ /dev/null @@ -1,34 +0,0 @@ -import 'package:meta/meta.dart'; -import 'package:equatable/equatable.dart'; - -abstract class AuthenticationEvent extends Equatable { - const AuthenticationEvent(); - - @override - List get props => []; -} - -// Fired just after the app is launched -class AppLoadedup extends AuthenticationEvent {} - -class UserLogOut extends AuthenticationEvent {} - -class GetUserData extends AuthenticationEvent {} - -class UserSignUp extends AuthenticationEvent { - final String email; - final String password; - UserSignUp({@required this.email, this.password}); - - @override - List get props => [email, password]; -} - -class UserLogin extends AuthenticationEvent { - final String email; - final String password; - UserLogin({@required this.email, this.password}); - - @override - List get props => [email, password]; -} diff --git a/examples/hacker-news/shared/lib/modules/authentication/bloc/authentication/authentication_state.dart b/examples/hacker-news/shared/lib/modules/authentication/bloc/authentication/authentication_state.dart deleted file mode 100644 index 627616d0..00000000 --- a/examples/hacker-news/shared/lib/modules/authentication/bloc/authentication/authentication_state.dart +++ /dev/null @@ -1,38 +0,0 @@ -import 'package:meta/meta.dart'; -import 'package:equatable/equatable.dart'; -import 'package:shared/modules/authentication/models/current_user_data.dart'; - -abstract class AuthenticationState extends Equatable { - const AuthenticationState(); - - @override - List get props => []; -} - -class AppAutheticated extends AuthenticationState {} - -class AuthenticationInitial extends AuthenticationState {} - -class AuthenticationLoading extends AuthenticationState {} - -class AuthenticationStart extends AuthenticationState {} - -class UserLogoutState extends AuthenticationState {} - -class SetUserData extends AuthenticationState { - final CurrentUserData currentUserData; - SetUserData({this.currentUserData}); - @override - List get props => [currentUserData]; -} - -class AuthenticationNotAuthenticated extends AuthenticationState {} - -class AuthenticationFailure extends AuthenticationState { - final String message; - - AuthenticationFailure({@required this.message}); - - @override - List get props => [message]; -} diff --git a/examples/hacker-news/shared/lib/modules/authentication/bloc/bloc_controller.dart b/examples/hacker-news/shared/lib/modules/authentication/bloc/bloc_controller.dart deleted file mode 100644 index f5cadbc3..00000000 --- a/examples/hacker-news/shared/lib/modules/authentication/bloc/bloc_controller.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'package:shared/main.dart'; - -class AuthenticationBlocController { - AuthenticationBlocController._(); - static AuthenticationBlocController _instance = - AuthenticationBlocController._(); - factory AuthenticationBlocController() => _instance; - - // ignore: close_sinks - AuthenticationBloc authenticationBloc = AuthenticationBloc(); -} diff --git a/examples/hacker-news/shared/lib/modules/authentication/models/auth_models_public.dart b/examples/hacker-news/shared/lib/modules/authentication/models/auth_models_public.dart deleted file mode 100644 index 040c2e1b..00000000 --- a/examples/hacker-news/shared/lib/modules/authentication/models/auth_models_public.dart +++ /dev/null @@ -1,4 +0,0 @@ -export 'package:shared/modules/authentication/models/token.dart'; -export 'package:shared/modules/authentication/models/user.dart'; -export 'package:shared/modules/authentication/models/user_data.dart'; -export 'package:shared/modules/authentication/models/current_user_data.dart'; diff --git a/examples/hacker-news/shared/lib/modules/authentication/models/current_user_data.dart b/examples/hacker-news/shared/lib/modules/authentication/models/current_user_data.dart deleted file mode 100644 index b4f7fdb6..00000000 --- a/examples/hacker-news/shared/lib/modules/authentication/models/current_user_data.dart +++ /dev/null @@ -1,77 +0,0 @@ -class CurrentUserData { - Data data; - Ad ad; - - CurrentUserData({this.data, this.ad}); - - CurrentUserData.fromJson(Map json) { - data = json['data'] != null ? new Data.fromJson(json['data']) : Data(); - ad = json['ad'] != null ? new Ad.fromJson(json['ad']) : Ad(); - } - - Map toJson() { - final Map data = new Map(); - if (this.data != null) { - data['data'] = this.data.toJson(); - } - if (this.ad != null) { - data['ad'] = this.ad.toJson(); - } - return data; - } -} - -class Data { - int id; - String email; - String firstName; - String lastName; - String avatar; - - Data( - {this.id, - this.email = '', - this.firstName = '', - this.lastName = '', - this.avatar = ''}); - - Data.fromJson(Map json) { - id = json['id']; - email = json['email']; - firstName = json['first_name']; - lastName = json['last_name']; - avatar = json['avatar']; - } - - Map toJson() { - final Map data = new Map(); - data['id'] = this.id; - data['email'] = this.email; - data['first_name'] = this.firstName; - data['last_name'] = this.lastName; - data['avatar'] = this.avatar; - return data; - } -} - -class Ad { - String company; - String url; - String text; - - Ad({this.company = '', this.url = '', this.text = ''}); - - Ad.fromJson(Map json) { - company = json['company']; - url = json['url']; - text = json['text']; - } - - Map toJson() { - final Map data = new Map(); - data['company'] = this.company; - data['url'] = this.url; - data['text'] = this.text; - return data; - } -} diff --git a/examples/hacker-news/shared/lib/modules/authentication/models/firebase_user.dart b/examples/hacker-news/shared/lib/modules/authentication/models/firebase_user.dart deleted file mode 100644 index 21d507ca..00000000 --- a/examples/hacker-news/shared/lib/modules/authentication/models/firebase_user.dart +++ /dev/null @@ -1,14 +0,0 @@ -class UserFromFirebaseUser { - final String uid; - final String email; - final String token; - final String avatar; - - UserFromFirebaseUser({ - this.uid, - this.email, - this.token, - this.avatar = - "https://i.pinimg.com/736x/89/90/48/899048ab0cc455154006fdb9676964b3.jpg", - }); -} diff --git a/examples/hacker-news/shared/lib/modules/authentication/models/token.dart b/examples/hacker-news/shared/lib/modules/authentication/models/token.dart deleted file mode 100644 index 41f1f92a..00000000 --- a/examples/hacker-news/shared/lib/modules/authentication/models/token.dart +++ /dev/null @@ -1,15 +0,0 @@ -class Token { - String token; - - Token({this.token}); - - Token.fromJson(Map json) { - token = json['token']; - } - - Map toJson() { - final Map data = new Map(); - data['token'] = this.token; - return data; - } -} diff --git a/examples/hacker-news/shared/lib/modules/authentication/models/user.dart b/examples/hacker-news/shared/lib/modules/authentication/models/user.dart deleted file mode 100644 index 739c8a04..00000000 --- a/examples/hacker-news/shared/lib/modules/authentication/models/user.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'package:meta/meta.dart'; - -class MyUser { - final String name; - final String email; - - MyUser({@required this.name, @required this.email}); - - @override - String toString() => 'User { name: $name, email: $email}'; -} diff --git a/examples/hacker-news/shared/lib/modules/authentication/models/user_data.dart b/examples/hacker-news/shared/lib/modules/authentication/models/user_data.dart deleted file mode 100644 index 1ef23e6c..00000000 --- a/examples/hacker-news/shared/lib/modules/authentication/models/user_data.dart +++ /dev/null @@ -1,18 +0,0 @@ -class UserData { - int id; - String token; - - UserData({this.id, this.token}); - - UserData.fromJson(Map json) { - id = json['id']; - token = json['token']; - } - - Map toJson() { - final Map data = new Map(); - data['id'] = this.id; - data['token'] = this.token; - return data; - } -} diff --git a/examples/hacker-news/shared/lib/modules/authentication/resources/authentication_repository.dart b/examples/hacker-news/shared/lib/modules/authentication/resources/authentication_repository.dart deleted file mode 100644 index 16671e39..00000000 --- a/examples/hacker-news/shared/lib/modules/authentication/resources/authentication_repository.dart +++ /dev/null @@ -1,27 +0,0 @@ -import 'package:api_sdk/main.dart'; - -class AuthenticationRepository { - Future signUpWithEmailAndPassword( - String email, String password) async { - await Future.delayed(Duration(seconds: 1)); // simulate a network delay - final response = await ApiSdk.signUpWithEmailAndPassword( - {'email': email, 'password': password}); - - return response; - } - - Future loginWithEmailAndPassword( - String email, String password) async { - await Future.delayed(Duration(seconds: 1)); // simulate a network delay - final response = await ApiSdk.loginWithEmailAndPassword( - {'email': email, 'password': password}); - - return response; - } - - Future getUserData(int id) async { - final response = await ApiSdk.getUserData(id); - - return response; - } -} diff --git a/examples/hacker-news/shared/lib/modules/hacker_news/bloc/comment_provider.dart b/examples/hacker-news/shared/lib/modules/hacker_news/bloc/comment_provider.dart deleted file mode 100644 index 57b06c42..00000000 --- a/examples/hacker-news/shared/lib/modules/hacker_news/bloc/comment_provider.dart +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:flutter/material.dart'; -import 'comments_bloc.dart'; - -class CommentsProvider extends InheritedWidget { - final CommentsBloc comments; - - CommentsProvider({Key key, Widget child}) - : comments = CommentsBloc(), - super(key: key, child: child); - - bool updateShouldNotify(InheritedWidget oldWidget) => true; - - static CommentsBloc of(BuildContext context) { - return (context.dependOnInheritedWidgetOfExactType()) - .comments; - } -} diff --git a/examples/hacker-news/shared/lib/modules/hacker_news/bloc/comments_bloc.dart b/examples/hacker-news/shared/lib/modules/hacker_news/bloc/comments_bloc.dart deleted file mode 100644 index 02c78618..00000000 --- a/examples/hacker-news/shared/lib/modules/hacker_news/bloc/comments_bloc.dart +++ /dev/null @@ -1,44 +0,0 @@ -import 'dart:core'; - -import 'package:rxdart/rxdart.dart'; -import 'package:shared/modules/hacker_news/models/news_models_public.dart'; - -import '../resources/news_repository.dart'; - -class CommentsBloc { - final _respository = Repository(); - final _commentsFetcher = PublishSubject(); - final _commentsOutput = BehaviorSubject>>(); - - CommentsBloc() { - _commentsFetcher.stream - .transform(_commentsTransformer()) - .pipe(_commentsOutput); - } - - //Sinks - Function(int) get fetchItemWithComments => _commentsFetcher.sink.add; - - //Streams - get itemWithComments => _commentsOutput.stream; - - disponse() { - _commentsFetcher.close(); - _commentsOutput.close(); - } - - _commentsTransformer() { - return ScanStreamTransformer( - (Map> cache, int id, index) { - cache[id] = _respository.fetchItem(id); - cache[id].then( - (NewsItemModel item) { - item.kids.forEach((kids) => fetchItemWithComments(kids)); - }, - ); - return cache; - }, - >{}, - ); - } -} diff --git a/examples/hacker-news/shared/lib/modules/hacker_news/bloc/stories_bloc.dart b/examples/hacker-news/shared/lib/modules/hacker_news/bloc/stories_bloc.dart deleted file mode 100644 index b26f98b1..00000000 --- a/examples/hacker-news/shared/lib/modules/hacker_news/bloc/stories_bloc.dart +++ /dev/null @@ -1,48 +0,0 @@ -import 'package:shared/modules/hacker_news/models/news_models_public.dart'; - -import '../resources/news_repository.dart'; -import 'package:rxdart/rxdart.dart'; -import 'dart:async'; - -class StoriesBloc { - final _repository = Repository(); - final _topId = PublishSubject>(); - final _itemsOutput = BehaviorSubject>>(); - final _itemsFetcher = PublishSubject(); - - //Getter for stream - get topId => _topId.stream; - get items => _itemsOutput.stream; - - //Getter for sink - Function(int) get fetchItem => _itemsFetcher.sink.add; - - StoriesBloc() { - _itemsFetcher.stream.transform(_itemTransformer()).pipe(_itemsOutput); - } - - fetchTopIds() async { - List ids = await _repository.fetchTopId(); - _topId.sink.add(ids); - } - - clearCache() { - return _repository.clearCache(); - } - - _itemTransformer() { - return ScanStreamTransformer( - (Map> cache, int id, index) { - cache[id] = _repository.fetchItem(id); - return cache; - }, - >{}, - ); - } - - dispose() { - _topId.close(); - _itemsFetcher.close(); - _itemsOutput.close(); - } -} diff --git a/examples/hacker-news/shared/lib/modules/hacker_news/bloc/stories_provider.dart b/examples/hacker-news/shared/lib/modules/hacker_news/bloc/stories_provider.dart deleted file mode 100644 index 501cfa6f..00000000 --- a/examples/hacker-news/shared/lib/modules/hacker_news/bloc/stories_provider.dart +++ /dev/null @@ -1,17 +0,0 @@ -import 'stories_bloc.dart'; -import 'package:flutter/material.dart'; - -class StoriesProvider extends InheritedWidget { - final StoriesBloc stories; - - StoriesProvider({Key key, Widget child}) - : stories = StoriesBloc(), - super(key: key, child: child); - - bool updateShouldNotify(_) => true; - - static StoriesBloc of(context) { - return (context.dependOnInheritedWidgetOfExactType()) - .stories; - } -} diff --git a/examples/hacker-news/shared/lib/modules/hacker_news/models/data_models/news_item_model.dart b/examples/hacker-news/shared/lib/modules/hacker_news/models/data_models/news_item_model.dart deleted file mode 100644 index dec68c23..00000000 --- a/examples/hacker-news/shared/lib/modules/hacker_news/models/data_models/news_item_model.dart +++ /dev/null @@ -1,65 +0,0 @@ -import 'dart:convert'; - -class NewsItemModel { - final int id; - final bool deleted; - final String type; - final String by; - final int time; - final String text; - final bool dead; - final int parent; - final List kids; - final String url; - final int score; - final String title; - final int descendants; - - NewsItemModel.fromJson(Map parsedJson) - : id = parsedJson['id'], - deleted = parsedJson['deleted'] ?? false, - type = parsedJson['type'], - by = parsedJson['by'] ?? '', - time = parsedJson['time'], - text = parsedJson['text'] ?? '', - dead = parsedJson['dead'] ?? false, - parent = parsedJson['parent'], - kids = parsedJson['kids'] ?? [], - url = parsedJson['url'], - score = parsedJson['score'], - title = parsedJson['title'], - descendants = parsedJson['descendants'] ?? 0; - - NewsItemModel.fromDb(Map parsedJson) - : id = parsedJson['id'], - deleted = parsedJson['deleted'] == 1, - type = parsedJson['type'], - by = parsedJson['by'], - time = parsedJson['time'], - text = parsedJson['text'], - dead = parsedJson['dead'] == 1, - parent = parsedJson['parent'], - kids = jsonDecode(parsedJson['kids']), - url = parsedJson['url'], - score = parsedJson['score'], - title = parsedJson['title'], - descendants = parsedJson['descendants']; - - Map toMap() { - return { - 'id': id, - 'type': type, - 'by': by, - 'time': time, - 'text': text, - 'parent': parent, - 'url': url, - 'score': score, - 'title': title, - 'descendants': descendants, - 'deleted': deleted ? 1 : 0, - 'dead': dead ? 1 : 0, - 'kids': jsonEncode(kids), - }; - } -} diff --git a/examples/hacker-news/shared/lib/modules/hacker_news/models/news_models_public.dart b/examples/hacker-news/shared/lib/modules/hacker_news/models/news_models_public.dart deleted file mode 100644 index 4b7a2e61..00000000 --- a/examples/hacker-news/shared/lib/modules/hacker_news/models/news_models_public.dart +++ /dev/null @@ -1 +0,0 @@ -export 'package:shared/modules/hacker_news/models/data_models/news_item_model.dart'; diff --git a/examples/hacker-news/shared/lib/modules/hacker_news/resources/news_repository.dart b/examples/hacker-news/shared/lib/modules/hacker_news/resources/news_repository.dart deleted file mode 100644 index 5f00a7aa..00000000 --- a/examples/hacker-news/shared/lib/modules/hacker_news/resources/news_repository.dart +++ /dev/null @@ -1,54 +0,0 @@ -import 'package:shared/modules/hacker_news/models/news_models_public.dart'; -import '../resources/resource_provider/news_api_provider.dart'; -import '../resources/resource_provider/news_db_provider.dart'; - -class Repository { - List sources = [ - newsDbProvider, - NewsApiProvider(), - ]; - - List caches = [ - newsDbProvider, - ]; - - Future> fetchTopId() { - return sources[1].fetchTopId(); - } - - Future fetchItem(int id) async { - NewsItemModel item; - var source; - - for (source in sources) { - item = await source.fetchItems(id); - if (item != null) { - break; - } - } - - for (var cache in caches) { - if (cache != source) { - cache.addItem(item); - } - } - - return item; - } - - clearCache() async { - for (var cache in caches) { - await cache.clear(); - } - } -} - -abstract class Source { - Future> fetchTopId(); - Future fetchItems(int id); -} - -abstract class Cache { - Future addItem(NewsItemModel item); - Future clear(); -} diff --git a/examples/hacker-news/shared/lib/modules/hacker_news/resources/resource_provider/news_api_provider.dart b/examples/hacker-news/shared/lib/modules/hacker_news/resources/resource_provider/news_api_provider.dart deleted file mode 100644 index 0cb21eb6..00000000 --- a/examples/hacker-news/shared/lib/modules/hacker_news/resources/resource_provider/news_api_provider.dart +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:api_sdk/main.dart'; -import 'package:shared/modules/hacker_news/models/news_models_public.dart'; -import '../news_repository.dart'; - -class NewsApiProvider implements Source { - Future> fetchTopId() async { - final response = await ApiSdk.fetchTopId(); - final ids = response; - return ids.cast(); - } - - Future fetchItems(int id) async { - final response = await ApiSdk.fetchItems(id); - final parsedJson = response; - return NewsItemModel.fromJson(parsedJson); - } -} diff --git a/examples/hacker-news/shared/lib/modules/hacker_news/resources/resource_provider/news_db_provider.dart b/examples/hacker-news/shared/lib/modules/hacker_news/resources/resource_provider/news_db_provider.dart deleted file mode 100644 index cfcb2c5e..00000000 --- a/examples/hacker-news/shared/lib/modules/hacker_news/resources/resource_provider/news_db_provider.dart +++ /dev/null @@ -1,71 +0,0 @@ -import 'package:shared/modules/hacker_news/models/news_models_public.dart'; -import 'package:sqflite/sqflite.dart'; -import 'package:path_provider/path_provider.dart'; -import 'dart:async'; -import 'package:path/path.dart'; -import 'dart:io'; - -import '../news_repository.dart'; - -class NewsDbProvider implements Source, Cache { - Database db; - - NewsDbProvider() { - init(); - } - - Future> fetchTopId() { - return null; - } - - void init() async { - Directory directory = await getApplicationDocumentsDirectory(); - final path = join(directory.path, 'items.db'); - db = await openDatabase(path, version: 1, - onCreate: (Database newDb, int version) { - newDb.execute(""" - CREATE TABLE Items - ( - id INTEGER PRIMARY KEY, - type TEXT, - by TEXT, - time INTEGER, - text TEXT, - parent INTEGER, - kids BLOB, - dead INTEGER, - deleted INTEGER, - url TEXT, - score INTEGER, - title TEXT, - descendants INTEGER - ) - """); - }); - } - - Future fetchItems(int id) async { - final map = await db.query( - 'Items', - columns: null, - where: 'id = ?', - whereArgs: [id], - ); - - if (map.length > 0) { - return NewsItemModel.fromDb(map.first); - } - return null; - } - - Future addItem(NewsItemModel items) { - return db.insert('Items', items.toMap(), - conflictAlgorithm: ConflictAlgorithm.ignore); - } - - Future clear() { - return db.delete('Items'); - } -} - -final newsDbProvider = NewsDbProvider(); diff --git a/examples/hacker-news/shared/pubspec.lock b/examples/hacker-news/shared/pubspec.lock deleted file mode 100644 index b923d897..00000000 --- a/examples/hacker-news/shared/pubspec.lock +++ /dev/null @@ -1,600 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - api_sdk: - dependency: "direct main" - description: - path: "../api_sdk" - relative: true - source: path - version: "1.0.0+1" - args: - dependency: transitive - description: - name: args - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.0" - async: - dependency: transitive - description: - name: async - url: "https://pub.dartlang.org" - source: hosted - version: "2.8.2" - bloc: - dependency: "direct main" - description: - name: bloc - url: "https://pub.dartlang.org" - source: hosted - version: "8.0.3" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - characters: - dependency: transitive - description: - name: characters - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - clock: - dependency: transitive - description: - name: clock - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - collection: - dependency: transitive - description: - name: collection - url: "https://pub.dartlang.org" - source: hosted - version: "1.15.0" - connectivity_plus: - dependency: transitive - description: - name: connectivity_plus - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.1" - connectivity_plus_linux: - dependency: transitive - description: - name: connectivity_plus_linux - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - connectivity_plus_macos: - dependency: transitive - description: - name: connectivity_plus_macos - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.1" - connectivity_plus_platform_interface: - dependency: transitive - description: - name: connectivity_plus_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_web: - dependency: transitive - description: - name: connectivity_plus_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_windows: - dependency: transitive - description: - name: connectivity_plus_windows - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - crypto: - dependency: transitive - description: - name: crypto - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.4" - dbus: - dependency: transitive - description: - name: dbus - url: "https://pub.dartlang.org" - source: hosted - version: "0.7.1" - equatable: - dependency: "direct main" - description: - name: equatable - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - fake_async: - dependency: transitive - description: - name: fake_async - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - ffi: - dependency: transitive - description: - name: ffi - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.2" - file: - dependency: transitive - description: - name: file - url: "https://pub.dartlang.org" - source: hosted - version: "6.1.2" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_bloc: - dependency: "direct main" - description: - name: flutter_bloc - url: "https://pub.dartlang.org" - source: hosted - version: "8.0.1" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - freezed_annotation: - dependency: transitive - description: - name: freezed_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - gql: - dependency: transitive - description: - name: gql - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.0" - gql_dedupe_link: - dependency: transitive - description: - name: gql_dedupe_link - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - gql_error_link: - dependency: transitive - description: - name: gql_error_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - gql_exec: - dependency: transitive - description: - name: gql_exec - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.0" - gql_http_link: - dependency: transitive - description: - name: gql_http_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.0" - gql_link: - dependency: transitive - description: - name: gql_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.0" - gql_transform_link: - dependency: transitive - description: - name: gql_transform_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - graphql: - dependency: transitive - description: - name: graphql - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.1" - graphql_flutter: - dependency: transitive - description: - name: graphql_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.1" - hive: - dependency: transitive - description: - name: hive - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - http: - dependency: transitive - description: - name: http - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.4" - http_parser: - dependency: transitive - description: - name: http_parser - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.0" - js: - dependency: transitive - description: - name: js - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.3" - json_annotation: - dependency: transitive - description: - name: json_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "4.4.0" - matcher: - dependency: transitive - description: - name: matcher - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.11" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.3" - meta: - dependency: transitive - description: - name: meta - url: "https://pub.dartlang.org" - source: hosted - version: "1.7.0" - nested: - dependency: transitive - description: - name: nested - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - nm: - dependency: transitive - description: - name: nm - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.0" - normalize: - dependency: transitive - description: - name: normalize - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.0+1" - path: - dependency: transitive - description: - name: path - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0" - path_provider: - dependency: "direct main" - description: - name: path_provider - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.9" - path_provider_android: - dependency: transitive - description: - name: path_provider_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.12" - path_provider_ios: - dependency: transitive - description: - name: path_provider_ios - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.8" - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.5" - path_provider_macos: - dependency: transitive - description: - name: path_provider_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - petitparser: - dependency: transitive - description: - name: petitparser - url: "https://pub.dartlang.org" - source: hosted - version: "4.4.0" - platform: - dependency: transitive - description: - name: platform - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.2" - process: - dependency: transitive - description: - name: process - url: "https://pub.dartlang.org" - source: hosted - version: "4.2.4" - provider: - dependency: transitive - description: - name: provider - url: "https://pub.dartlang.org" - source: hosted - version: "6.0.2" - rxdart: - dependency: "direct main" - description: - name: rxdart - url: "https://pub.dartlang.org" - source: hosted - version: "0.27.3" - shared_preferences: - dependency: "direct main" - description: - name: shared_preferences - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.13" - shared_preferences_android: - dependency: transitive - description: - name: shared_preferences_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.11" - shared_preferences_ios: - dependency: transitive - description: - name: shared_preferences_ios - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - shared_preferences_linux: - dependency: transitive - description: - name: shared_preferences_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - shared_preferences_macos: - dependency: transitive - description: - name: shared_preferences_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - shared_preferences_platform_interface: - dependency: transitive - description: - name: shared_preferences_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - shared_preferences_web: - dependency: transitive - description: - name: shared_preferences_web - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - shared_preferences_windows: - dependency: transitive - description: - name: shared_preferences_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_span: - dependency: transitive - description: - name: source_span - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.1" - sqflite: - dependency: "direct main" - description: - name: sqflite - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.2" - sqflite_common: - dependency: transitive - description: - name: sqflite_common - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.1" - stack_trace: - dependency: transitive - description: - name: stack_trace - url: "https://pub.dartlang.org" - source: hosted - version: "1.10.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - synchronized: - dependency: transitive - description: - name: synchronized - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - test_api: - dependency: transitive - description: - name: test_api - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.8" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - uuid: - dependency: transitive - description: - name: uuid - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.6" - vector_math: - dependency: transitive - description: - name: vector_math - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - win32: - dependency: transitive - description: - name: win32 - url: "https://pub.dartlang.org" - source: hosted - version: "2.4.2" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0+1" - xml: - dependency: transitive - description: - name: xml - url: "https://pub.dartlang.org" - source: hosted - version: "5.3.1" -sdks: - dart: ">=2.16.0 <3.0.0" - flutter: ">=2.8.0" diff --git a/examples/hacker-news/shared/pubspec.yaml b/examples/hacker-news/shared/pubspec.yaml deleted file mode 100644 index 8cb2d44e..00000000 --- a/examples/hacker-news/shared/pubspec.yaml +++ /dev/null @@ -1,84 +0,0 @@ -name: shared -description: A new Flutter project. - -# The following line prevents the package from being accidentally published to -# pub.dev using `pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev - -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.0+1 - -environment: - sdk: ">=2.7.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.0 - sqflite: ^2.0.2 - path_provider: ^2.0.9 - rxdart: ^0.27.3 - bloc: ^8.0.3 - flutter_bloc: ^8.0.1 - equatable: ^2.0.3 - shared_preferences: ^2.0.13 - api_sdk: - path: ../api_sdk -dev_dependencies: - flutter_test: - sdk: flutter - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter. -flutter: - - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. - uses-material-design: true - - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware. - - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/assets-and-images/#from-packages - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/custom-fonts/#from-packages diff --git a/examples/hacker-news/shared/test/widget_test.dart b/examples/hacker-news/shared/test/widget_test.dart deleted file mode 100644 index 570e0e47..00000000 --- a/examples/hacker-news/shared/test/widget_test.dart +++ /dev/null @@ -1,8 +0,0 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility that Flutter provides. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - -void main() {} diff --git a/examples/weather-app/README.md b/examples/weather-app/README.md deleted file mode 100644 index 4a0b9949..00000000 --- a/examples/weather-app/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# Flutter starter - - -To see this example go to flutter-starter-kit/examples/weather-app -The api url is in `api-constants.dart` - -```dart -Map apiConstants = { - "openweather": "https://api.openweathermap.org/data/2.5", - "auth": "https://reqres.in/api" -}; -``` -We have used an open source [weather api](https://openweathermap.org/current). -To Login use this credantials: -``` -Email "eve.holt@reqres.in", -Password "pistol" -``` -The demo for the app looks like this: - - \ No newline at end of file diff --git a/examples/weather-app/api_sdk/.gitignore b/examples/weather-app/api_sdk/.gitignore deleted file mode 100644 index 9d532b18..00000000 --- a/examples/weather-app/api_sdk/.gitignore +++ /dev/null @@ -1,41 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json diff --git a/examples/weather-app/api_sdk/.metadata b/examples/weather-app/api_sdk/.metadata deleted file mode 100644 index 107fcb7b..00000000 --- a/examples/weather-app/api_sdk/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 8874f21e79d7ec66d0457c7ab338348e31b17f1d - channel: stable - -project_type: app diff --git a/examples/weather-app/api_sdk/README.md b/examples/weather-app/api_sdk/README.md deleted file mode 100644 index 39e5a3fa..00000000 --- a/examples/weather-app/api_sdk/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# api_sdk - -A new Flutter project. - -## Getting Started - -This project is a starting point for a Flutter application. - -A few resources to get you started if this is your first Flutter project: - -- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) - -For help getting started with Flutter, view our -[online documentation](https://flutter.dev/docs), which offers tutorials, -samples, guidance on mobile development, and a full API reference. diff --git a/examples/weather-app/api_sdk/lib/api_constants.dart b/examples/weather-app/api_sdk/lib/api_constants.dart deleted file mode 100644 index 15de065b..00000000 --- a/examples/weather-app/api_sdk/lib/api_constants.dart +++ /dev/null @@ -1,6 +0,0 @@ -Map apiConstants = { - "openweather": "https://api.openweathermap.org/data/2.5", - "auth": "https://reqres.in/api" -}; - -String appId = "76c6d3d3ca02483285a88070bea2cf07"; diff --git a/examples/weather-app/api_sdk/lib/main.dart b/examples/weather-app/api_sdk/lib/main.dart deleted file mode 100644 index 34942d69..00000000 --- a/examples/weather-app/api_sdk/lib/main.dart +++ /dev/null @@ -1,28 +0,0 @@ -import 'package:api_sdk/api_constants.dart'; -import 'package:api_sdk/rest/rest_api_handler_data.dart'; - -class ApiSdk { - static loginWithEmailAndPassword(dynamic body) async { - final response = await RestApiHandlerData.postData( - '${apiConstants["auth"]}/login', body); - return response; - } - - static signUpWithEmailAndPassword(dynamic body) async { - final response = await RestApiHandlerData.postData( - '${apiConstants["auth"]}/register', body); - return response; - } - - static getUserData(int id) async { - final response = - await RestApiHandlerData.getData('${apiConstants["auth"]}/users/$id'); - return response; - } - - static getWeatherforCity(String city) async { - final response = await RestApiHandlerData.getData( - '${apiConstants["openweather"]}/weather?q=$city&appid=$appId'); - return response; - } -} diff --git a/examples/weather-app/api_sdk/lib/rest/api_helpers/api_base_helper.dart b/examples/weather-app/api_sdk/lib/rest/api_helpers/api_base_helper.dart deleted file mode 100644 index 26fc9682..00000000 --- a/examples/weather-app/api_sdk/lib/rest/api_helpers/api_base_helper.dart +++ /dev/null @@ -1,72 +0,0 @@ -import 'dart:convert'; -import 'dart:io'; - -import 'package:http/http.dart' as http; - -import 'api_exception.dart'; - -dynamic _returnResponse(http.Response response) { - switch (response.statusCode) { - case 200: - var responseJson = json.decode(response.body.toString()); - return responseJson; - case 400: - return json.decode(response.body.toString()); - case 401: - case 403: - return json.decode(response.body.toString()); - case 500: - default: - return FetchDataException( - 'Error occured while Communication with Server with StatusCode : ${response.statusCode}'); - } -} - -class ApiBaseHelper { - Future delete(String url) async { - var apiResponse; - try { - final response = await http.delete(Uri.parse(url)); - apiResponse = _returnResponse(response); - } on SocketException { - throw FetchDataException('No Internet connection'); - } - - return apiResponse; - } - - Future get(String url) async { - var responseJson; - try { - final response = await http.get(Uri.parse(url)); - responseJson = _returnResponse(response); - } on SocketException { - throw FetchDataException('No Internet connection'); - } - return responseJson; - } - - Future post(String url, dynamic body) async { - var responseJson; - try { - final response = await http.post(Uri.parse(url), body: body); - responseJson = _returnResponse(response); - } on SocketException { - throw FetchDataException('No Internet connection'); - } - - return responseJson; - } - - Future put(String url, dynamic body) async { - var responseJson; - try { - final response = await http.put(Uri.parse(url), body: body); - responseJson = _returnResponse(response); - } on SocketException { - throw FetchDataException('No Internet connection'); - } - - return responseJson; - } -} diff --git a/examples/weather-app/api_sdk/lib/rest/api_helpers/api_exception.dart b/examples/weather-app/api_sdk/lib/rest/api_helpers/api_exception.dart deleted file mode 100644 index acdc758e..00000000 --- a/examples/weather-app/api_sdk/lib/rest/api_helpers/api_exception.dart +++ /dev/null @@ -1,27 +0,0 @@ -class AppException implements Exception { - final _message; - final _prefix; - - AppException([this._message, this._prefix]); - - String toString() { - return "$_prefix$_message"; - } -} - -class FetchDataException extends AppException { - FetchDataException([String message]) - : super(message, "Error During Communication: "); -} - -class BadRequestException extends AppException { - BadRequestException([message]) : super(message, "Invalid Request: "); -} - -class UnauthorisedException extends AppException { - UnauthorisedException([message]) : super(message, "Unauthorised: "); -} - -class InvalidInputException extends AppException { - InvalidInputException([String message]) : super(message, "Invalid Input: "); -} diff --git a/examples/weather-app/api_sdk/lib/rest/rest_api_handler_data.dart b/examples/weather-app/api_sdk/lib/rest/rest_api_handler_data.dart deleted file mode 100644 index 8dd7e51b..00000000 --- a/examples/weather-app/api_sdk/lib/rest/rest_api_handler_data.dart +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:api_sdk/rest/api_helpers/api_base_helper.dart'; - -class RestApiHandlerData { - static ApiBaseHelper _apiBaseHelper = ApiBaseHelper(); - static getData(String path) async { - final response = await _apiBaseHelper.get('$path'); - return response; - } - - static postData(String path, dynamic body) async { - final response = await _apiBaseHelper.post('$path', body); - return response; - } -} diff --git a/examples/weather-app/api_sdk/pubspec.lock b/examples/weather-app/api_sdk/pubspec.lock deleted file mode 100644 index d4fa3f9a..00000000 --- a/examples/weather-app/api_sdk/pubspec.lock +++ /dev/null @@ -1,488 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - args: - dependency: transitive - description: - name: args - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.0" - async: - dependency: transitive - description: - name: async - url: "https://pub.dartlang.org" - source: hosted - version: "2.8.2" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - characters: - dependency: transitive - description: - name: characters - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - clock: - dependency: transitive - description: - name: clock - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - collection: - dependency: transitive - description: - name: collection - url: "https://pub.dartlang.org" - source: hosted - version: "1.15.0" - connectivity_plus: - dependency: transitive - description: - name: connectivity_plus - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.1" - connectivity_plus_linux: - dependency: transitive - description: - name: connectivity_plus_linux - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - connectivity_plus_macos: - dependency: transitive - description: - name: connectivity_plus_macos - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.1" - connectivity_plus_platform_interface: - dependency: transitive - description: - name: connectivity_plus_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_web: - dependency: transitive - description: - name: connectivity_plus_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_windows: - dependency: transitive - description: - name: connectivity_plus_windows - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - crypto: - dependency: transitive - description: - name: crypto - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.4" - dbus: - dependency: transitive - description: - name: dbus - url: "https://pub.dartlang.org" - source: hosted - version: "0.7.1" - equatable: - dependency: "direct main" - description: - name: equatable - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - fake_async: - dependency: transitive - description: - name: fake_async - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - ffi: - dependency: transitive - description: - name: ffi - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.2" - file: - dependency: transitive - description: - name: file - url: "https://pub.dartlang.org" - source: hosted - version: "6.1.2" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - freezed_annotation: - dependency: "direct main" - description: - name: freezed_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - gql: - dependency: "direct main" - description: - name: gql - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.0" - gql_dedupe_link: - dependency: transitive - description: - name: gql_dedupe_link - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - gql_error_link: - dependency: transitive - description: - name: gql_error_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - gql_exec: - dependency: transitive - description: - name: gql_exec - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.0" - gql_http_link: - dependency: transitive - description: - name: gql_http_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.0" - gql_link: - dependency: transitive - description: - name: gql_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.0" - gql_transform_link: - dependency: transitive - description: - name: gql_transform_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - graphql: - dependency: "direct main" - description: - name: graphql - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.1" - graphql_flutter: - dependency: "direct main" - description: - name: graphql_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.1" - hive: - dependency: transitive - description: - name: hive - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - http: - dependency: "direct main" - description: - name: http - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.4" - http_parser: - dependency: transitive - description: - name: http_parser - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.0" - js: - dependency: transitive - description: - name: js - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.3" - json_annotation: - dependency: transitive - description: - name: json_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "4.4.0" - matcher: - dependency: transitive - description: - name: matcher - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.11" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.3" - meta: - dependency: transitive - description: - name: meta - url: "https://pub.dartlang.org" - source: hosted - version: "1.7.0" - nm: - dependency: transitive - description: - name: nm - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.0" - normalize: - dependency: transitive - description: - name: normalize - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.0+1" - path: - dependency: transitive - description: - name: path - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0" - path_provider: - dependency: transitive - description: - name: path_provider - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.9" - path_provider_android: - dependency: transitive - description: - name: path_provider_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.12" - path_provider_ios: - dependency: transitive - description: - name: path_provider_ios - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.8" - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.5" - path_provider_macos: - dependency: transitive - description: - name: path_provider_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - petitparser: - dependency: transitive - description: - name: petitparser - url: "https://pub.dartlang.org" - source: hosted - version: "4.4.0" - platform: - dependency: transitive - description: - name: platform - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.2" - process: - dependency: transitive - description: - name: process - url: "https://pub.dartlang.org" - source: hosted - version: "4.2.4" - rxdart: - dependency: transitive - description: - name: rxdart - url: "https://pub.dartlang.org" - source: hosted - version: "0.27.3" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_span: - dependency: transitive - description: - name: source_span - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.1" - stack_trace: - dependency: transitive - description: - name: stack_trace - url: "https://pub.dartlang.org" - source: hosted - version: "1.10.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - test_api: - dependency: transitive - description: - name: test_api - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.8" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - uuid: - dependency: transitive - description: - name: uuid - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.6" - vector_math: - dependency: transitive - description: - name: vector_math - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - win32: - dependency: transitive - description: - name: win32 - url: "https://pub.dartlang.org" - source: hosted - version: "2.4.2" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0+1" - xml: - dependency: transitive - description: - name: xml - url: "https://pub.dartlang.org" - source: hosted - version: "5.3.1" -sdks: - dart: ">=2.15.0 <3.0.0" - flutter: ">=2.8.0" diff --git a/examples/weather-app/api_sdk/pubspec.yaml b/examples/weather-app/api_sdk/pubspec.yaml deleted file mode 100644 index 749a87a9..00000000 --- a/examples/weather-app/api_sdk/pubspec.yaml +++ /dev/null @@ -1,84 +0,0 @@ -name: api_sdk -description: A new Flutter project. - -# The following line prevents the package from being accidentally published to -# pub.dev using `pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev - -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.0+1 - -environment: - sdk: ">=2.7.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.0 - http: - - graphql: ^5.0.1 - graphql_flutter: ^5.0.1 - gql: ^0.13.0 - freezed_annotation: ^1.1.0 - - equatable: ^2.0.3 - -dev_dependencies: - flutter_test: - sdk: flutter - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter. -flutter: - - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. - uses-material-design: true - - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware. - - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/assets-and-images/#from-packages - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/custom-fonts/#from-packages diff --git a/examples/weather-app/api_sdk/test/widget_test.dart b/examples/weather-app/api_sdk/test/widget_test.dart deleted file mode 100644 index 570e0e47..00000000 --- a/examples/weather-app/api_sdk/test/widget_test.dart +++ /dev/null @@ -1,8 +0,0 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility that Flutter provides. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - -void main() {} diff --git a/examples/weather-app/app/.gitignore b/examples/weather-app/app/.gitignore deleted file mode 100644 index 0fa6b675..00000000 --- a/examples/weather-app/app/.gitignore +++ /dev/null @@ -1,46 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json - -# Android Studio will place build artifacts here -/android/app/debug -/android/app/profile -/android/app/release diff --git a/examples/weather-app/app/.metadata b/examples/weather-app/app/.metadata deleted file mode 100644 index 5a023280..00000000 --- a/examples/weather-app/app/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 7e9793dee1b85a243edd0e06cb1658e98b077561 - channel: stable - -project_type: app diff --git a/examples/weather-app/app/README.md b/examples/weather-app/app/README.md deleted file mode 100644 index e7694a28..00000000 --- a/examples/weather-app/app/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# app - -A new Flutter project. - -## Getting Started - -This project is a starting point for a Flutter application. - -A few resources to get you started if this is your first Flutter project: - -- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) - -For help getting started with Flutter, view our -[online documentation](https://flutter.dev/docs), which offers tutorials, -samples, guidance on mobile development, and a full API reference. diff --git a/examples/weather-app/app/analysis_options.yaml b/examples/weather-app/app/analysis_options.yaml deleted file mode 100644 index 61b6c4de..00000000 --- a/examples/weather-app/app/analysis_options.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# This file configures the analyzer, which statically analyzes Dart code to -# check for errors, warnings, and lints. -# -# The issues identified by the analyzer are surfaced in the UI of Dart-enabled -# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be -# invoked from the command line by running `flutter analyze`. - -# 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 - -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` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at - # https://dart-lang.github.io/linter/lints/index.html. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. - rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/examples/weather-app/app/android/.gitignore b/examples/weather-app/app/android/.gitignore deleted file mode 100644 index 6f568019..00000000 --- a/examples/weather-app/app/android/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java - -# Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app -key.properties -**/*.keystore -**/*.jks diff --git a/examples/weather-app/app/android/app/src/debug/AndroidManifest.xml b/examples/weather-app/app/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index 99f406bd..00000000 --- a/examples/weather-app/app/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/examples/weather-app/app/android/app/src/main/AndroidManifest.xml b/examples/weather-app/app/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 3f2d4034..00000000 --- a/examples/weather-app/app/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - diff --git a/examples/weather-app/app/android/app/src/main/kotlin/com/example/app/MainActivity.kt b/examples/weather-app/app/android/app/src/main/kotlin/com/example/app/MainActivity.kt deleted file mode 100644 index 461fcfba..00000000 --- a/examples/weather-app/app/android/app/src/main/kotlin/com/example/app/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.app - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/examples/weather-app/app/android/app/src/main/res/drawable-v21/launch_background.xml b/examples/weather-app/app/android/app/src/main/res/drawable-v21/launch_background.xml deleted file mode 100644 index f74085f3..00000000 --- a/examples/weather-app/app/android/app/src/main/res/drawable-v21/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/examples/weather-app/app/android/app/src/main/res/drawable/launch_background.xml b/examples/weather-app/app/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f8..00000000 --- a/examples/weather-app/app/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/examples/weather-app/app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/examples/weather-app/app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b..00000000 Binary files a/examples/weather-app/app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/examples/weather-app/app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/examples/weather-app/app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79..00000000 Binary files a/examples/weather-app/app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/examples/weather-app/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/examples/weather-app/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d43914..00000000 Binary files a/examples/weather-app/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/weather-app/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/examples/weather-app/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d3..00000000 Binary files a/examples/weather-app/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/weather-app/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/examples/weather-app/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372ee..00000000 Binary files a/examples/weather-app/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/weather-app/app/android/app/src/main/res/values-night/styles.xml b/examples/weather-app/app/android/app/src/main/res/values-night/styles.xml deleted file mode 100644 index 3db14bb5..00000000 --- a/examples/weather-app/app/android/app/src/main/res/values-night/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/examples/weather-app/app/android/app/src/main/res/values/styles.xml b/examples/weather-app/app/android/app/src/main/res/values/styles.xml deleted file mode 100644 index d460d1e9..00000000 --- a/examples/weather-app/app/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/examples/weather-app/app/android/app/src/profile/AndroidManifest.xml b/examples/weather-app/app/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index 99f406bd..00000000 --- a/examples/weather-app/app/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/examples/weather-app/app/android/build.gradle b/examples/weather-app/app/android/build.gradle deleted file mode 100644 index 4256f917..00000000 --- a/examples/weather-app/app/android/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -buildscript { - ext.kotlin_version = '1.6.10' - repositories { - google() - mavenCentral() - } - - dependencies { - classpath 'com.android.tools.build:gradle:4.1.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - mavenCentral() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/examples/weather-app/app/android/gradle.properties b/examples/weather-app/app/android/gradle.properties deleted file mode 100644 index 94adc3a3..00000000 --- a/examples/weather-app/app/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.useAndroidX=true -android.enableJetifier=true diff --git a/examples/weather-app/app/android/settings.gradle b/examples/weather-app/app/android/settings.gradle deleted file mode 100644 index 44e62bcf..00000000 --- a/examples/weather-app/app/android/settings.gradle +++ /dev/null @@ -1,11 +0,0 @@ -include ':app' - -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() - -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } - -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/examples/weather-app/app/assets/images/2.0x/logo.png b/examples/weather-app/app/assets/images/2.0x/logo.png deleted file mode 100644 index f2c967ff..00000000 Binary files a/examples/weather-app/app/assets/images/2.0x/logo.png and /dev/null differ diff --git a/examples/weather-app/app/assets/images/3.0x/logo.png b/examples/weather-app/app/assets/images/3.0x/logo.png deleted file mode 100644 index 6b5dcc95..00000000 Binary files a/examples/weather-app/app/assets/images/3.0x/logo.png and /dev/null differ diff --git a/examples/weather-app/app/assets/images/logo.png b/examples/weather-app/app/assets/images/logo.png deleted file mode 100644 index aba93c52..00000000 Binary files a/examples/weather-app/app/assets/images/logo.png and /dev/null differ diff --git a/examples/weather-app/app/ios/.gitignore b/examples/weather-app/app/ios/.gitignore deleted file mode 100644 index 7a7f9873..00000000 --- a/examples/weather-app/app/ios/.gitignore +++ /dev/null @@ -1,34 +0,0 @@ -**/dgph -*.mode1v3 -*.mode2v3 -*.moved-aside -*.pbxuser -*.perspectivev3 -**/*sync/ -.sconsign.dblite -.tags* -**/.vagrant/ -**/DerivedData/ -Icon? -**/Pods/ -**/.symlinks/ -profile -xcuserdata -**/.generated/ -Flutter/App.framework -Flutter/Flutter.framework -Flutter/Flutter.podspec -Flutter/Generated.xcconfig -Flutter/ephemeral/ -Flutter/app.flx -Flutter/app.zip -Flutter/flutter_assets/ -Flutter/flutter_export_environment.sh -ServiceDefinitions.json -Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!default.mode1v3 -!default.mode2v3 -!default.pbxuser -!default.perspectivev3 diff --git a/examples/weather-app/app/ios/Flutter/Debug.xcconfig b/examples/weather-app/app/ios/Flutter/Debug.xcconfig deleted file mode 100644 index 592ceee8..00000000 --- a/examples/weather-app/app/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/examples/weather-app/app/ios/Flutter/Release.xcconfig b/examples/weather-app/app/ios/Flutter/Release.xcconfig deleted file mode 100644 index 592ceee8..00000000 --- a/examples/weather-app/app/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/examples/weather-app/app/ios/Runner.xcodeproj/project.pbxproj b/examples/weather-app/app/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index fb16edd3..00000000 --- a/examples/weather-app/app/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,481 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 50; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - ); - path = Runner; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1300; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 1100; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - 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_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - 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_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.app; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - 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_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - 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_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - 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_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - 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_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - 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_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.app; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.app; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/examples/weather-app/app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/weather-app/app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6..00000000 --- a/examples/weather-app/app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/examples/weather-app/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/weather-app/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/examples/weather-app/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/weather-app/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/weather-app/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5..00000000 --- a/examples/weather-app/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/examples/weather-app/app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/examples/weather-app/app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index c87d15a3..00000000 --- a/examples/weather-app/app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/weather-app/app/ios/Runner.xcworkspace/contents.xcworkspacedata b/examples/weather-app/app/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16..00000000 --- a/examples/weather-app/app/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/examples/weather-app/app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/weather-app/app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/examples/weather-app/app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/weather-app/app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/weather-app/app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5..00000000 --- a/examples/weather-app/app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/examples/weather-app/app/ios/Runner/AppDelegate.swift b/examples/weather-app/app/ios/Runner/AppDelegate.swift deleted file mode 100644 index 70693e4a..00000000 --- a/examples/weather-app/app/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import UIKit -import Flutter - -@UIApplicationMain -@objc class AppDelegate: FlutterAppDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } -} diff --git a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d36b1fab..00000000 --- a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "Icon-App-1024x1024@1x.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada47..00000000 Binary files a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf03..00000000 Binary files a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd96..00000000 Binary files a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0..00000000 Binary files a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde1211..00000000 Binary files a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7..00000000 Binary files a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306..00000000 Binary files a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd96..00000000 Binary files a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f..00000000 Binary files a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b860..00000000 Binary files a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b860..00000000 Binary files a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164..00000000 Binary files a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d3..00000000 Binary files a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e..00000000 Binary files a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f585..00000000 Binary files a/examples/weather-app/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/examples/weather-app/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/examples/weather-app/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 0bedcf2f..00000000 --- a/examples/weather-app/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "LaunchImage.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/examples/weather-app/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/examples/weather-app/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eac..00000000 Binary files a/examples/weather-app/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/examples/weather-app/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/examples/weather-app/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eac..00000000 Binary files a/examples/weather-app/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/examples/weather-app/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/examples/weather-app/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eac..00000000 Binary files a/examples/weather-app/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/examples/weather-app/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/examples/weather-app/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b..00000000 --- a/examples/weather-app/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/examples/weather-app/app/ios/Runner/Base.lproj/LaunchScreen.storyboard b/examples/weather-app/app/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7..00000000 --- a/examples/weather-app/app/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/weather-app/app/ios/Runner/Base.lproj/Main.storyboard b/examples/weather-app/app/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516..00000000 --- a/examples/weather-app/app/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/weather-app/app/ios/Runner/Info.plist b/examples/weather-app/app/ios/Runner/Info.plist deleted file mode 100644 index 00943528..00000000 --- a/examples/weather-app/app/ios/Runner/Info.plist +++ /dev/null @@ -1,47 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleDisplayName - App - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - app - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/examples/weather-app/app/ios/Runner/Runner-Bridging-Header.h b/examples/weather-app/app/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 308a2a56..00000000 --- a/examples/weather-app/app/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" diff --git a/examples/weather-app/app/lib/main.dart b/examples/weather-app/app/lib/main.dart deleted file mode 100644 index e5859d7c..00000000 --- a/examples/weather-app/app/lib/main.dart +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:app/src/app.dart'; -import 'package:app/src/utils/app_state_notifier.dart'; -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -void main() { - runApp( - ChangeNotifierProvider( - create: (_) => AppStateNotifier(), - child: App(), - ), - ); -} diff --git a/examples/weather-app/app/lib/src/app.dart b/examples/weather-app/app/lib/src/app.dart deleted file mode 100644 index 44213c7c..00000000 --- a/examples/weather-app/app/lib/src/app.dart +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:app/src/config/theme_data.dart'; -import 'package:app/src/routes/index.dart'; -import 'package:app/src/utils/app_state_notifier.dart'; -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -class App extends StatelessWidget { - Widget build(BuildContext context) { - return Consumer(builder: (context, appState, child) { - return MaterialApp( - title: 'News!', - theme: ThemeConfig.lightTheme, - darkTheme: ThemeConfig.darkTheme, - themeMode: appState.isDarkMode ? ThemeMode.dark : ThemeMode.light, - onGenerateRoute: routes, - ); - }); - } -} diff --git a/examples/weather-app/app/lib/src/config/color_constants.dart b/examples/weather-app/app/lib/src/config/color_constants.dart deleted file mode 100644 index 77c1f519..00000000 --- a/examples/weather-app/app/lib/src/config/color_constants.dart +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:flutter/material.dart'; - -Color hexToColor(String hex) { - assert(RegExp(r'^#([0-9a-fA-F]{6})|([0-9a-fA-F]{8})$').hasMatch(hex), - 'hex color must be #rrggbb or #rrggbbaa'); - - return Color( - int.parse(hex.substring(1), radix: 16) + - (hex.length == 7 ? 0xff000000 : 0x00000000), - ); -} - -class ColorConstants { - static Color lightScaffoldBackgroundColor = hexToColor('#F9F9F9'); - static Color darkScaffoldBackgroundColor = hexToColor('#2F2E2E'); - static Color secondaryAppColor = hexToColor('#5E92F3'); - static Color secondaryDarkAppColor = Colors.white; -} diff --git a/examples/weather-app/app/lib/src/config/image_constants.dart b/examples/weather-app/app/lib/src/config/image_constants.dart deleted file mode 100644 index e9a8cc01..00000000 --- a/examples/weather-app/app/lib/src/config/image_constants.dart +++ /dev/null @@ -1,10 +0,0 @@ -class AllImages { - AllImages._(); - static AllImages _instance = AllImages._(); - factory AllImages() => _instance; - - String image = 'assets/image'; - String logo = 'assets/images/logo.png'; - String kDefaultImage = - 'https://cdn.pixabay.com/photo/2016/08/08/09/17/avatar-1577909_1280.png'; -} diff --git a/examples/weather-app/app/lib/src/config/string_constants.dart b/examples/weather-app/app/lib/src/config/string_constants.dart deleted file mode 100644 index ebfc751d..00000000 --- a/examples/weather-app/app/lib/src/config/string_constants.dart +++ /dev/null @@ -1,22 +0,0 @@ -library constants; - -// Onboarding Screens -const String app_name = "APP NAME"; - -// tabs -const String tab0 = "Tab 0"; -const String tab1 = "Tab 1"; -const String tab2 = "Tab 2"; -const String tab3 = "Tab 3"; - -//Screen 1 -const String screen_util = "Screen"; - -//home -const String app_bar_title = 'Weather App'; - -//Weather Screens -const String enter_city_name = 'Enter City Name Here'; -const String search = 'Search'; -const String weather_image_const_1 = "http://openweathermap.org/img/wn/"; -const String weather_image_const_2 = "@2x.png"; diff --git a/examples/weather-app/app/lib/src/config/theme_data.dart b/examples/weather-app/app/lib/src/config/theme_data.dart deleted file mode 100644 index 5f76a010..00000000 --- a/examples/weather-app/app/lib/src/config/theme_data.dart +++ /dev/null @@ -1,215 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; - -import 'color_constants.dart'; - -class ThemeConfig { - static ThemeData get darkTheme => createTheme( - brightness: Brightness.dark, - background: ColorConstants.darkScaffoldBackgroundColor, - cardBackground: ColorConstants.secondaryDarkAppColor, - primaryText: Colors.white, - secondaryText: Colors.black, - accentColor: ColorConstants.secondaryDarkAppColor, - divider: Colors.black45, - buttonBackground: Colors.white, - buttonText: ColorConstants.secondaryDarkAppColor, - disabled: ColorConstants.secondaryDarkAppColor, - error: Colors.red, - ); - - static ThemeData get lightTheme => createTheme( - brightness: Brightness.light, - background: ColorConstants.lightScaffoldBackgroundColor, - cardBackground: ColorConstants.secondaryAppColor, - primaryText: Colors.black, - secondaryText: Colors.white, - accentColor: ColorConstants.secondaryAppColor, - divider: ColorConstants.secondaryAppColor, - buttonBackground: Colors.black38, - buttonText: ColorConstants.secondaryAppColor, - disabled: ColorConstants.secondaryAppColor, - error: Colors.red, - ); - - static ThemeData createTheme({ - Brightness brightness, - Color background, - Color primaryText, - Color secondaryText, - Color accentColor, - Color divider, - Color buttonBackground, - Color buttonText, - Color cardBackground, - Color disabled, - Color error, - }) { - final baseTextTheme = brightness == Brightness.dark - ? Typography.blackMountainView - : Typography.whiteMountainView; - - return ThemeData( - brightness: brightness, - canvasColor: background, - cardColor: background, - dividerColor: divider, - dividerTheme: DividerThemeData( - color: divider, - space: 1, - thickness: 1, - ), - cardTheme: CardTheme( - color: cardBackground, - margin: EdgeInsets.zero, - clipBehavior: Clip.antiAliasWithSaveLayer, - ), - elevatedButtonTheme: ElevatedButtonThemeData( - style: ButtonStyle( - shape: MaterialStateProperty.all( - RoundedRectangleBorder( - borderRadius: BorderRadius.circular(18.0), - side: BorderSide(color: Colors.red))), - padding: MaterialStateProperty.all( - const EdgeInsets.all(16)))), - backgroundColor: background, - primaryColor: accentColor, - toggleableActiveColor: accentColor, - appBarTheme: AppBarTheme( - systemOverlayStyle: - SystemUiOverlayStyle(statusBarBrightness: brightness), - color: cardBackground, - iconTheme: IconThemeData( - color: secondaryText, - ), - toolbarTextStyle: TextTheme( - bodyText1: baseTextTheme.bodyText1.copyWith( - color: secondaryText, - fontSize: 18, - ), - ).bodyText2, - titleTextStyle: TextTheme( - bodyText1: baseTextTheme.bodyText1.copyWith( - color: secondaryText, - fontSize: 18, - ), - ).headline6, - ), - iconTheme: IconThemeData( - color: secondaryText, - size: 16.0, - ), - errorColor: error, - buttonTheme: ButtonThemeData( - textTheme: ButtonTextTheme.primary, - colorScheme: ColorScheme( - brightness: brightness, - primary: accentColor, - secondary: accentColor, - surface: background, - background: background, - error: error, - onPrimary: buttonText, - onSecondary: buttonText, - onSurface: buttonText, - onBackground: buttonText, - onError: buttonText, - ), - padding: const EdgeInsets.all(16.0), - ), - cupertinoOverrideTheme: CupertinoThemeData( - brightness: brightness, - primaryColor: accentColor, - ), - inputDecorationTheme: InputDecorationTheme( - errorStyle: TextStyle(color: error), - labelStyle: TextStyle( - fontFamily: '', - fontWeight: FontWeight.w600, - fontSize: 16.0, - color: primaryText.withOpacity(0.5), - ), - hintStyle: TextStyle( - color: secondaryText, - fontSize: 13.0, - fontWeight: FontWeight.w300, - ), - ), - fontFamily: '', - textTheme: TextTheme( - headline1: baseTextTheme.headline1.copyWith( - color: primaryText, - fontSize: 34.0, - fontWeight: FontWeight.bold, - ), - headline2: baseTextTheme.headline2.copyWith( - color: primaryText, - fontSize: 22, - fontWeight: FontWeight.bold, - ), - headline3: baseTextTheme.headline3.copyWith( - color: secondaryText, - fontSize: 20, - fontWeight: FontWeight.w600, - ), - headline4: baseTextTheme.headline4.copyWith( - color: primaryText, - fontSize: 18, - fontWeight: FontWeight.w600, - ), - headline5: baseTextTheme.headline5.copyWith( - color: primaryText, - fontSize: 16, - fontWeight: FontWeight.w700, - ), - headline6: baseTextTheme.headline6.copyWith( - color: primaryText, - fontSize: 14, - fontWeight: FontWeight.w700, - ), - bodyText1: baseTextTheme.bodyText1.copyWith( - color: secondaryText, - fontSize: 15, - ), - bodyText2: baseTextTheme.bodyText2.copyWith( - color: primaryText, - fontSize: 12, - fontWeight: FontWeight.w400, - ), - button: baseTextTheme.button.copyWith( - color: primaryText, - fontSize: 12.0, - fontWeight: FontWeight.w700, - ), - caption: baseTextTheme.caption.copyWith( - color: primaryText, - fontSize: 11.0, - fontWeight: FontWeight.w300, - ), - overline: baseTextTheme.overline.copyWith( - color: secondaryText, - fontSize: 11.0, - fontWeight: FontWeight.w500, - ), - subtitle1: baseTextTheme.subtitle1.copyWith( - color: primaryText, - fontSize: 16.0, - fontWeight: FontWeight.w700, - ), - subtitle2: baseTextTheme.subtitle2.copyWith( - color: secondaryText, - fontSize: 11.0, - fontWeight: FontWeight.w500, - ), - ), - colorScheme: ColorScheme.fromSwatch() - .copyWith(secondary: accentColor, brightness: brightness), - textSelectionTheme: TextSelectionThemeData( - cursorColor: accentColor, - selectionColor: accentColor, - selectionHandleColor: accentColor, - ), - ); - } -} diff --git a/examples/weather-app/app/lib/src/routes/index.dart b/examples/weather-app/app/lib/src/routes/index.dart deleted file mode 100644 index 5b2647bc..00000000 --- a/examples/weather-app/app/lib/src/routes/index.dart +++ /dev/null @@ -1,18 +0,0 @@ -// routes for the app -import 'package:app/src/screens/home/index.dart'; -import 'package:app/src/screens/onboarding/authentication_screen.dart'; -import 'package:app/src/splash_screen.dart'; -import 'package:flutter/material.dart'; - -Route routes(RouteSettings settings) { - switch (settings.name) { - case '/': - return MaterialPageRoute(builder: (_) => SplashScreen()); - case '/home': - return MaterialPageRoute(builder: (_) => HomeScreen()); - case '/auth': - return MaterialPageRoute(builder: (_) => AuthenticationScreen()); - default: - return MaterialPageRoute(builder: (_) => SplashScreen()); - } -} diff --git a/examples/weather-app/app/lib/src/screens/home/index.dart b/examples/weather-app/app/lib/src/screens/home/index.dart deleted file mode 100644 index 38ea06e8..00000000 --- a/examples/weather-app/app/lib/src/screens/home/index.dart +++ /dev/null @@ -1,117 +0,0 @@ -// home screen contents -import 'package:app/src/config/image_constants.dart'; -import 'package:app/src/config/string_constants.dart' as string_constants; -import 'package:app/src/screens/weather_screens/weather_page.dart'; -import 'package:app/src/utils/app_state_notifier.dart'; -import 'package:app/src/widgets/cache_image_widget.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:provider/provider.dart'; -import 'package:shared/main.dart'; - -class HomeScreen extends StatelessWidget { - // ignore: close_sinks - final AuthenticationBloc authenticationBloc = - AuthenticationBlocController().authenticationBloc; - - @override - Widget build(BuildContext context) { - authenticationBloc.add(GetUserData()); - return WillPopScope( - onWillPop: () async => false, - child: BlocBuilder( - bloc: authenticationBloc, - builder: (BuildContext context, AuthenticationState state) { - if (state is SetUserData) { - return Scaffold( - appBar: AppBar( - centerTitle: true, - title: Text( - string_constants.app_bar_title, - style: Theme.of(context).appBarTheme.titleTextStyle, - ), - actions: [ - IconButton( - icon: Icon(Icons.logout), - onPressed: () { - authenticationBloc.add(UserLogOut()); - }), - ], - ), - body: BlocProvider( - create: (context) => WeatherBloc(), - child: WeatherPage(), - ), - drawer: Drawer( - child: ListView( - padding: EdgeInsets.zero, - children: [ - DrawerHeader( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(50), - color: Colors.white), - child: CachedImage( - imageUrl: - state.currentUserData.data.avatar, - fit: BoxFit.fitWidth, - errorWidget: Image.network( - AllImages().kDefaultImage, - ), - width: 80, - height: 80, - placeholder: CircularProgressIndicator(), - ), - ), - Switch( - value: - Provider.of(context) - .isDarkMode, - onChanged: (value) { - Provider.of(context, - listen: false) - .updateTheme(value); - }, - ), - ], - ) - ], - ), - decoration: BoxDecoration( - color: Theme.of(context).dividerColor, - ), - ), - ListTile( - title: Text( - '${state.currentUserData.data.firstName} ${state.currentUserData.data.lastName}', - style: Theme.of(context).textTheme.bodyText2), - ), - ListTile( - title: Text(state.currentUserData.data.email, - style: Theme.of(context).textTheme.bodyText2), - ), - ListTile( - title: Text(state.currentUserData.ad.company, - style: Theme.of(context).textTheme.bodyText2), - ), - ], - ), - ), - ); - } - return Scaffold( - body: Center( - child: CircularProgressIndicator(), - ), - ); - })); - } -} diff --git a/examples/weather-app/app/lib/src/screens/onboarding/authentication_screen.dart b/examples/weather-app/app/lib/src/screens/onboarding/authentication_screen.dart deleted file mode 100644 index e0cd88e4..00000000 --- a/examples/weather-app/app/lib/src/screens/onboarding/authentication_screen.dart +++ /dev/null @@ -1,136 +0,0 @@ -import 'package:app/src/screens/onboarding/login_screen.dart'; -import 'package:app/src/screens/onboarding/signup_screen.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:shared/main.dart'; - -class AuthenticationScreen extends StatefulWidget { - @override - _AuthenticationScreenState createState() => _AuthenticationScreenState(); -} - -class _AuthenticationScreenState extends State { - bool showLoginForm = false; - // ignore: close_sinks - AuthenticationBloc authenticationBloc; - @override - Widget build(BuildContext context) { - void _showError(String error) async { - await Fluttertoast.showToast( - msg: error, - toastLength: Toast.LENGTH_SHORT, - gravity: ToastGravity.BOTTOM, - timeInSecForIosWeb: 3, - backgroundColor: Colors.red, - textColor: Colors.white, - fontSize: 16.0); - } - - return Scaffold( - body: WillPopScope( - onWillPop: () async => false, - child: BlocListener( - bloc: authenticationBloc, - listener: (context, state) { - if (state is AuthenticationFailure) { - _showError(state.message); - } - }, - child: BlocBuilder( - bloc: authenticationBloc, - builder: (BuildContext context, AuthenticationState state) { - return SafeArea( - child: Stack( - children: [ - Center( - child: ListView( - shrinkWrap: true, - children: [ - Center( - child: Text( - showLoginForm ? 'LOGIN' : 'SIGN UP', - style: Theme.of(context).textTheme.headline2, - )), - Padding( - padding: const EdgeInsets.all(32.0), - child: showLoginForm - ? LoginForm( - authenticationBloc: authenticationBloc, - state: state, - ) - : SignUpForm( - authenticationBloc: authenticationBloc, - state: state, - ), - ), - showLoginForm - ? SizedBox() - : Padding( - padding: const EdgeInsets.all(32.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - SizedBox( - height: 38, - ), - Text('Already have an account?'), - SizedBox( - height: 8, - ), - RaisedButton( - color: Theme.of(context).primaryColor, - textColor: Colors.white, - padding: const EdgeInsets.all(16), - shape: new RoundedRectangleBorder( - borderRadius: - new BorderRadius.circular( - 8.0)), - child: Text( - 'Login', - style: Theme.of(context) - .textTheme - .bodyText1, - ), - onPressed: () { - setState(() { - showLoginForm = true; - }); - }) - ], - ), - ) - ], - ), - ), - !showLoginForm - ? SizedBox() - : Positioned( - left: 6, - child: IconButton( - icon: Icon( - Icons.arrow_back_ios, - size: 32, - color: Theme.of(context).primaryColor, - ), - onPressed: () { - setState(() { - showLoginForm = false; - }); - }, - ), - ) - ], - ), - ); - }), - ), - )); - } - - @override - void initState() { - authenticationBloc = AuthenticationBlocController().authenticationBloc; - super.initState(); - } -} diff --git a/examples/weather-app/app/lib/src/screens/onboarding/login_screen.dart b/examples/weather-app/app/lib/src/screens/onboarding/login_screen.dart deleted file mode 100644 index 92bb83fc..00000000 --- a/examples/weather-app/app/lib/src/screens/onboarding/login_screen.dart +++ /dev/null @@ -1,84 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:shared/main.dart'; - -class LoginForm extends StatefulWidget { - final AuthenticationBloc authenticationBloc; - final AuthenticationState state; - LoginForm({this.authenticationBloc, this.state}); - @override - _LoginFormState createState() => _LoginFormState(); -} - -class _LoginFormState extends State { - final GlobalKey _key = GlobalKey(); - final _passwordController = TextEditingController(); - final _emailController = TextEditingController(); - - @override - Widget build(BuildContext context) { - return Form( - key: _key, - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - TextFormField( - decoration: InputDecoration( - labelText: 'Email address', - filled: true, - isDense: true, - ), - controller: _emailController, - keyboardType: TextInputType.emailAddress, - autocorrect: false, - validator: (value) { - if (value.isEmpty) { - return 'Email is required.'; - } - return null; - }, - ), - SizedBox( - height: 12, - ), - TextFormField( - decoration: InputDecoration( - labelText: 'Password', - filled: true, - isDense: true, - ), - obscureText: true, - controller: _passwordController, - validator: (value) { - if (value.isEmpty) { - return 'Password is required.'; - } - return null; - }, - ), - const SizedBox( - height: 16, - ), - RaisedButton( - color: Theme.of(context).primaryColor, - textColor: Colors.white, - padding: const EdgeInsets.all(16), - shape: new RoundedRectangleBorder( - borderRadius: new BorderRadius.circular(8.0)), - child: widget.state is AuthenticationLoading - ? CircularProgressIndicator( - backgroundColor: - Theme.of(context).textTheme.bodyText1.color, - ) - : Text('Login', style: Theme.of(context).textTheme.bodyText1), - onPressed: () { - if (_key.currentState.validate()) { - widget.authenticationBloc.add(UserLogin( - email: _emailController.text, - password: _passwordController.text)); - } else {} - }) - ], - ), - ); - } -} diff --git a/examples/weather-app/app/lib/src/screens/onboarding/signup_screen.dart b/examples/weather-app/app/lib/src/screens/onboarding/signup_screen.dart deleted file mode 100644 index 5e55471f..00000000 --- a/examples/weather-app/app/lib/src/screens/onboarding/signup_screen.dart +++ /dev/null @@ -1,89 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:shared/main.dart'; - -class SignUpForm extends StatefulWidget { - final AuthenticationBloc authenticationBloc; - final AuthenticationState state; - SignUpForm({this.authenticationBloc, this.state}); - @override - _SignUpFormState createState() => _SignUpFormState(); -} - -class _SignUpFormState extends State { - final GlobalKey _key = GlobalKey(); - final _passwordController = TextEditingController(); - final _emailController = TextEditingController(); - - @override - Widget build(BuildContext context) { - return Form( - key: _key, - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - TextFormField( - decoration: InputDecoration( - labelText: 'Email address', - filled: true, - isDense: true, - ), - controller: _emailController, - keyboardType: TextInputType.emailAddress, - autocorrect: false, - validator: (value) { - if (value.isEmpty) { - return 'Email is required.'; - } - return null; - }, - ), - SizedBox( - height: 12, - ), - TextFormField( - decoration: InputDecoration( - labelText: 'Password', - filled: true, - isDense: true, - ), - obscureText: true, - controller: _passwordController, - validator: (value) { - if (value.isEmpty) { - return 'Password is required.'; - } - return null; - }, - ), - const SizedBox( - height: 16, - ), - RaisedButton( - color: Theme.of(context).primaryColor, - textColor: Colors.white, - padding: const EdgeInsets.all(16), - shape: new RoundedRectangleBorder( - borderRadius: new BorderRadius.circular(8.0)), - child: widget.state is AuthenticationLoading - ? CircularProgressIndicator( - backgroundColor: - Theme.of(context).textTheme.bodyText1.color, - ) - : Text( - 'Sign Up', - style: Theme.of(context).textTheme.bodyText1, - ), - onPressed: () { - if (_key.currentState.validate()) { - widget.authenticationBloc.add(UserSignUp( - email: _emailController.text, - password: _passwordController.text)); - } else { - print('Form not validated'); - } - }) - ], - ), - ); - } -} diff --git a/examples/weather-app/app/lib/src/screens/weather_screens/weather_page.dart b/examples/weather-app/app/lib/src/screens/weather_screens/weather_page.dart deleted file mode 100644 index 154ae8d0..00000000 --- a/examples/weather-app/app/lib/src/screens/weather_screens/weather_page.dart +++ /dev/null @@ -1,88 +0,0 @@ -import 'package:app/src/screens/weather_screens/widgets/build_weather.dart'; -import 'package:app/src/utils/size_utils.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:shared/main.dart'; -import 'package:app/src/config/string_constants.dart' as string_constants; - -class WeatherPage extends StatefulWidget { - @override - _WeatherPageState createState() => _WeatherPageState(); -} - -class _WeatherPageState extends State { - WeatherBloc weatherBloc; - - @override - Widget build(BuildContext context) { - weatherBloc = BlocProvider.of(context); - TextEditingController _cityNameController = TextEditingController(); - return Container( - width: double.infinity, - padding: EdgeInsets.symmetric( - horizontal: 20.toWidth, - vertical: 18.toHeight, - ), - child: ListView( - children: [ - TextFormField( - keyboardType: TextInputType.text, - style: Theme.of(context).textTheme.headline6, - autofocus: false, - textAlign: TextAlign.left, - controller: _cityNameController, - autocorrect: false, - cursorColor: Theme.of(context).colorScheme.primary, - decoration: InputDecoration( - labelText: string_constants.enter_city_name, - filled: true, - isDense: true, - ), - ), - SizedBox(height: 42.toHeight), - SizedBox( - height: 100.toHeight, - width: 250.toWidth, - child: RaisedButton( - elevation: 3, - onPressed: () { - weatherBloc.add( - SearchClickedEvent(city: _cityNameController.text), - ); - FocusScope.of(context).requestFocus(new FocusNode()); - }, - child: Text(string_constants.search), - ), - ), - SizedBox(height: 40.toHeight), - BlocBuilder(builder: (context, state) { - if (state is SearchSuccessState) - return BuildWeather( - weatherModel: state.weatherModel, - ); - else if (state is InitialSuccessState) - return Container(); - else if (state is LoadingState) - return _buildLoadingScreen(); - else if (state is FailureState) - return _buildErrorPage(state.message, state.cod); - else - return Container(); - }), - ], - ), - ); - } - - Widget _buildLoadingScreen() { - return Center( - child: CircularProgressIndicator(), - ); - } - - Widget _buildErrorPage(String message, String code) { - return Center( - child: code == null ? Text("$message") : Text("$message : $code"), - ); - } -} diff --git a/examples/weather-app/app/lib/src/screens/weather_screens/widgets/build_weather.dart b/examples/weather-app/app/lib/src/screens/weather_screens/widgets/build_weather.dart deleted file mode 100644 index 53ffcf43..00000000 --- a/examples/weather-app/app/lib/src/screens/weather_screens/widgets/build_weather.dart +++ /dev/null @@ -1,97 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:app/src/utils/size_utils.dart'; -import 'package:shared/main.dart'; -import 'package:app/src/config/string_constants.dart' as string_constants; - -class BuildWeather extends StatelessWidget { - final WeatherModel weatherModel; - const BuildWeather({Key key, this.weatherModel}) : super(key: key); - - @override - Widget build(BuildContext context) { - return Container( - width: double.infinity, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - "${weatherModel.cityName},", - style: Theme.of(context) - .textTheme - .bodyText2 - .copyWith(fontSize: 50.toFont), - ), - Text( - weatherModel.countryCode, - style: Theme.of(context) - .textTheme - .bodyText2 - .copyWith(fontSize: 50.toFont), - ), - ], - ), - SizedBox(height: 40.toHeight), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - weatherModel.mainWeather, - style: Theme.of(context) - .textTheme - .bodyText2 - .copyWith(fontSize: 70.toFont), - ), - Image.network( - string_constants.weather_image_const_1 + - weatherModel.icon + - string_constants.weather_image_const_2, - ), - ], - ), - Text( - weatherModel.description, - style: Theme.of(context) - .textTheme - .bodyText2 - .copyWith(fontSize: 30.toFont), - ), - SizedBox(height: 40.toHeight), - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - Text( - "${weatherModel.temp}°", - style: Theme.of(context) - .textTheme - .bodyText2 - .copyWith(fontSize: 110.toFont), - ), - Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - Text( - "Min: ${weatherModel.minTemp}°", - style: Theme.of(context).textTheme.bodyText2, - ), - Text( - "Max: ${weatherModel.maxTemp}°", - style: Theme.of(context).textTheme.bodyText2, - ), - ], - ), - ], - ), - SizedBox(height: 30.toHeight), - Text( - "Wind Speed : ${weatherModel.windSpeed}", - style: Theme.of(context).textTheme.bodyText2, - ), - ], - ), - ); - } -} diff --git a/examples/weather-app/app/lib/src/splash_screen.dart b/examples/weather-app/app/lib/src/splash_screen.dart deleted file mode 100644 index c8f1ca2b..00000000 --- a/examples/weather-app/app/lib/src/splash_screen.dart +++ /dev/null @@ -1,47 +0,0 @@ -import 'package:app/src/config/color_constants.dart'; -import 'package:app/src/config/image_constants.dart'; -import 'package:app/src/utils/size_utils.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:shared/main.dart'; - -class SplashScreen extends StatefulWidget { - @override - _SplashScreenState createState() => _SplashScreenState(); -} - -class _SplashScreenState extends State { - AuthenticationBloc authenticationBloc; - @override - Widget build(BuildContext context) { - SizeConfig().init(context); - return Scaffold( - backgroundColor: ColorConstants.secondaryAppColor, - body: BlocListener( - bloc: authenticationBloc, - listener: (BuildContext context, AuthenticationState state) { - if (state is AppAutheticated) { - Navigator.pushNamed(context, '/home'); - } - if (state is AuthenticationStart) { - Navigator.pushNamed(context, '/auth'); - } - if (state is UserLogoutState) { - Navigator.pushNamed(context, '/auth'); - } - }, - child: BlocBuilder( - bloc: authenticationBloc, - builder: (BuildContext context, AuthenticationState state) { - return Center(child: Image.asset(AllImages().logo)); - }), - )); - } - - @override - void initState() { - authenticationBloc = AuthenticationBlocController().authenticationBloc; - authenticationBloc.add(AppLoadedup()); - super.initState(); - } -} diff --git a/examples/weather-app/app/lib/src/utils/app_state_notifier.dart b/examples/weather-app/app/lib/src/utils/app_state_notifier.dart deleted file mode 100644 index 1ddc68ec..00000000 --- a/examples/weather-app/app/lib/src/utils/app_state_notifier.dart +++ /dev/null @@ -1,10 +0,0 @@ -import 'package:flutter/material.dart'; - -class AppStateNotifier extends ChangeNotifier { - bool isDarkMode = false; - - void updateTheme(bool isDarkMode) { - this.isDarkMode = isDarkMode; - notifyListeners(); - } -} diff --git a/examples/weather-app/app/lib/src/utils/size_utils.dart b/examples/weather-app/app/lib/src/utils/size_utils.dart deleted file mode 100644 index b46a5fc1..00000000 --- a/examples/weather-app/app/lib/src/utils/size_utils.dart +++ /dev/null @@ -1,81 +0,0 @@ -import 'package:flutter/material.dart'; - -class SizeConfig { - SizeConfig._(); - static SizeConfig _instance = SizeConfig._(); - factory SizeConfig() => _instance; - - MediaQueryData _mediaQueryData; - double screenWidth; - double screenHeight; - double blockSizeHorizontal; - double blockSizeVertical; - double _safeAreaHorizontal; - double _safeAreaVertical; - double safeBlockHorizontal; - double safeBlockVertical; - double profileDrawerWidth; - double refHeight; - double refWidth; - - void init(BuildContext context) { - _mediaQueryData = MediaQuery.of(context); - screenWidth = _mediaQueryData.size.width; - screenHeight = _mediaQueryData.size.height; - refHeight = 1450; - refWidth = 670; - - if (screenHeight < 1200) { - blockSizeHorizontal = screenWidth / 100; - blockSizeVertical = screenHeight / 100; - - _safeAreaHorizontal = - _mediaQueryData.padding.left + _mediaQueryData.padding.right; - _safeAreaVertical = - _mediaQueryData.padding.top + _mediaQueryData.padding.bottom; - safeBlockHorizontal = (screenWidth - _safeAreaHorizontal) / 100; - safeBlockVertical = (screenHeight - _safeAreaVertical) / 100; - } else { - blockSizeHorizontal = screenWidth / 120; - blockSizeVertical = screenHeight / 120; - - _safeAreaHorizontal = - _mediaQueryData.padding.left + _mediaQueryData.padding.right; - _safeAreaVertical = - _mediaQueryData.padding.top + _mediaQueryData.padding.bottom; - safeBlockHorizontal = (screenWidth - _safeAreaHorizontal) / 120; - safeBlockVertical = (screenHeight - _safeAreaVertical) / 120; - } - } - - double getWidthRatio(double val) { - double res = (val / refWidth) * 100; - double temp = res * blockSizeHorizontal; - - return temp; - } - - double getHeightRatio(double val) { - double res = (val / refHeight) * 100; - double temp = res * blockSizeVertical; - return temp; - } - - double getFontRatio(double val) { - double res = (val / refWidth) * 100; - double temp = 0.0; - if (screenWidth < screenHeight) { - temp = res * safeBlockHorizontal; - } else { - temp = res * safeBlockVertical; - } - - return temp; - } -} - -extension SizeUtils on num { - double get toWidth => SizeConfig().getWidthRatio(this.toDouble()); - double get toHeight => SizeConfig().getHeightRatio(this.toDouble()); - double get toFont => SizeConfig().getFontRatio(this.toDouble()); -} diff --git a/examples/weather-app/app/lib/src/widgets/cache_image_widget.dart b/examples/weather-app/app/lib/src/widgets/cache_image_widget.dart deleted file mode 100644 index 022f17d1..00000000 --- a/examples/weather-app/app/lib/src/widgets/cache_image_widget.dart +++ /dev/null @@ -1,35 +0,0 @@ -import 'package:cached_network_image/cached_network_image.dart'; -import 'package:flutter/material.dart'; - -class CachedImage extends StatelessWidget { - CachedImage({ - Key key, - @required this.imageUrl, - this.fit = BoxFit.cover, - this.height, - this.width, - this.placeholder, - this.errorWidget, - }) : assert(imageUrl != null), - super(key: key); - - final String imageUrl; - final BoxFit fit; - final double height; - final double width; - final Widget placeholder; - final Widget errorWidget; - - @override - Widget build(BuildContext context) { - return CachedNetworkImage( - imageUrl: imageUrl, - fit: fit, - height: height, - width: width, - placeholder: (context, url) => placeholder ?? CircularProgressIndicator(), - errorWidget: (context, url, err) => - errorWidget ?? Icon(Icons.error_outline), - ); - } -} diff --git a/examples/weather-app/app/linux/.gitignore b/examples/weather-app/app/linux/.gitignore deleted file mode 100644 index d3896c98..00000000 --- a/examples/weather-app/app/linux/.gitignore +++ /dev/null @@ -1 +0,0 @@ -flutter/ephemeral diff --git a/examples/weather-app/app/linux/CMakeLists.txt b/examples/weather-app/app/linux/CMakeLists.txt deleted file mode 100644 index 5c553c66..00000000 --- a/examples/weather-app/app/linux/CMakeLists.txt +++ /dev/null @@ -1,116 +0,0 @@ -cmake_minimum_required(VERSION 3.10) -project(runner LANGUAGES CXX) - -set(BINARY_NAME "app") -set(APPLICATION_ID "com.example.app") - -cmake_policy(SET CMP0063 NEW) - -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() - -# Configure build 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. -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() - -set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") - -# Flutter library and tool build rules. -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}") - -# Application build -add_executable(${BINARY_NAME} - "main.cc" - "my_application.cc" - "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" -) -apply_standard_settings(${BINARY_NAME}) -target_link_libraries(${BINARY_NAME} PRIVATE flutter) -target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) -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) - -if(PLUGIN_BUNDLED_LIBRARIES) - install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) -endif() - -# 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/examples/weather-app/app/linux/flutter/CMakeLists.txt b/examples/weather-app/app/linux/flutter/CMakeLists.txt deleted file mode 100644 index 33fd5801..00000000 --- a/examples/weather-app/app/linux/flutter/CMakeLists.txt +++ /dev/null @@ -1,87 +0,0 @@ -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/examples/weather-app/app/linux/flutter/generated_plugin_registrant.cc b/examples/weather-app/app/linux/flutter/generated_plugin_registrant.cc deleted file mode 100644 index e71a16d2..00000000 --- a/examples/weather-app/app/linux/flutter/generated_plugin_registrant.cc +++ /dev/null @@ -1,11 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#include "generated_plugin_registrant.h" - - -void fl_register_plugins(FlPluginRegistry* registry) { -} diff --git a/examples/weather-app/app/linux/flutter/generated_plugin_registrant.h b/examples/weather-app/app/linux/flutter/generated_plugin_registrant.h deleted file mode 100644 index e0f0a47b..00000000 --- a/examples/weather-app/app/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/examples/weather-app/app/linux/flutter/generated_plugins.cmake b/examples/weather-app/app/linux/flutter/generated_plugins.cmake deleted file mode 100644 index 51436ae8..00000000 --- a/examples/weather-app/app/linux/flutter/generated_plugins.cmake +++ /dev/null @@ -1,15 +0,0 @@ -# -# Generated file, do not edit. -# - -list(APPEND FLUTTER_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) diff --git a/examples/weather-app/app/linux/main.cc b/examples/weather-app/app/linux/main.cc deleted file mode 100644 index e7c5c543..00000000 --- a/examples/weather-app/app/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/examples/weather-app/app/linux/my_application.cc b/examples/weather-app/app/linux/my_application.cc deleted file mode 100644 index 42d9b08a..00000000 --- a/examples/weather-app/app/linux/my_application.cc +++ /dev/null @@ -1,104 +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, "app"); - 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, "app"); - } - - 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 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_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/examples/weather-app/app/linux/my_application.h b/examples/weather-app/app/linux/my_application.h deleted file mode 100644 index 72271d5e..00000000 --- a/examples/weather-app/app/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/examples/weather-app/app/macos/.gitignore b/examples/weather-app/app/macos/.gitignore deleted file mode 100644 index 746adbb6..00000000 --- a/examples/weather-app/app/macos/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -# Flutter-related -**/Flutter/ephemeral/ -**/Pods/ - -# Xcode-related -**/dgph -**/xcuserdata/ diff --git a/examples/weather-app/app/macos/Flutter/Flutter-Debug.xcconfig b/examples/weather-app/app/macos/Flutter/Flutter-Debug.xcconfig deleted file mode 100644 index c2efd0b6..00000000 --- a/examples/weather-app/app/macos/Flutter/Flutter-Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/examples/weather-app/app/macos/Flutter/Flutter-Release.xcconfig b/examples/weather-app/app/macos/Flutter/Flutter-Release.xcconfig deleted file mode 100644 index c2efd0b6..00000000 --- a/examples/weather-app/app/macos/Flutter/Flutter-Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/examples/weather-app/app/macos/Flutter/GeneratedPluginRegistrant.swift b/examples/weather-app/app/macos/Flutter/GeneratedPluginRegistrant.swift deleted file mode 100644 index 081ceae9..00000000 --- a/examples/weather-app/app/macos/Flutter/GeneratedPluginRegistrant.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// Generated file. Do not edit. -// - -import FlutterMacOS -import Foundation - -import connectivity_plus_macos -import path_provider_macos -import shared_preferences_macos -import sqflite - -func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { - ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin")) - PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) - SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) - SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) -} diff --git a/examples/weather-app/app/macos/Runner.xcodeproj/project.pbxproj b/examples/weather-app/app/macos/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index 87088f13..00000000 --- a/examples/weather-app/app/macos/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,572 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 51; - 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 */ - 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 */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 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 */ - 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 /* app.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "app.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 = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 33CC10EA2044A3C60003C045 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 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 */, - 33CC10EE2044A3C60003C045 /* Products */, - D73912EC22F37F3D000D13A0 /* Frameworks */, - ); - sourceTree = ""; - }; - 33CC10EE2044A3C60003C045 /* Products */ = { - isa = PBXGroup; - children = ( - 33CC10ED2044A3C60003C045 /* app.app */, - ); - 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 = ""; - }; - D73912EC22F37F3D000D13A0 /* Frameworks */ = { - isa = PBXGroup; - children = ( - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 33CC10EC2044A3C60003C045 /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 33CC10E92044A3C60003C045 /* Sources */, - 33CC10EA2044A3C60003C045 /* Frameworks */, - 33CC10EB2044A3C60003C045 /* Resources */, - 33CC110E2044A8840003C045 /* Bundle Framework */, - 3399D490228B24CF009A79C7 /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - 33CC11202044C79F0003C045 /* PBXTargetDependency */, - ); - name = Runner; - productName = Runner; - productReference = 33CC10ED2044A3C60003C045 /* app.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 33CC10E52044A3C60003C045 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1300; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 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 */, - 33CC111A2044C6BA0003C045 /* Flutter Assemble */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 33CC10EB2044A3C60003C045 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, - 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3399D490228B24CF009A79C7 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - 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"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 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 */ - 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 */ - 338D0CE9231458BD00FA5F75 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - 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; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - 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.11; - 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", - ); - 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; - 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; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - 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.11; - 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; - 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; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - 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.11; - 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", - ); - 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", - ); - 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 */ - 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/examples/weather-app/app/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/weather-app/app/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/examples/weather-app/app/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/weather-app/app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/examples/weather-app/app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index 2aba2321..00000000 --- a/examples/weather-app/app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/weather-app/app/macos/Runner.xcworkspace/contents.xcworkspacedata b/examples/weather-app/app/macos/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16..00000000 --- a/examples/weather-app/app/macos/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/examples/weather-app/app/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/weather-app/app/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/examples/weather-app/app/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/weather-app/app/macos/Runner/AppDelegate.swift b/examples/weather-app/app/macos/Runner/AppDelegate.swift deleted file mode 100644 index d53ef643..00000000 --- a/examples/weather-app/app/macos/Runner/AppDelegate.swift +++ /dev/null @@ -1,9 +0,0 @@ -import Cocoa -import FlutterMacOS - -@NSApplicationMain -class AppDelegate: FlutterAppDelegate { - override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { - return true - } -} diff --git a/examples/weather-app/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/weather-app/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index a2ec33f1..00000000 --- a/examples/weather-app/app/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/examples/weather-app/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/examples/weather-app/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png deleted file mode 100644 index 3c4935a7..00000000 Binary files a/examples/weather-app/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png and /dev/null differ diff --git a/examples/weather-app/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/examples/weather-app/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png deleted file mode 100644 index ed4cc164..00000000 Binary files a/examples/weather-app/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png and /dev/null differ diff --git a/examples/weather-app/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/examples/weather-app/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png deleted file mode 100644 index 483be613..00000000 Binary files a/examples/weather-app/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png and /dev/null differ diff --git a/examples/weather-app/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/examples/weather-app/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png deleted file mode 100644 index bcbf36df..00000000 Binary files a/examples/weather-app/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png and /dev/null differ diff --git a/examples/weather-app/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/examples/weather-app/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png deleted file mode 100644 index 9c0a6528..00000000 Binary files a/examples/weather-app/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png and /dev/null differ diff --git a/examples/weather-app/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/examples/weather-app/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png deleted file mode 100644 index e71a7261..00000000 Binary files a/examples/weather-app/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png and /dev/null differ diff --git a/examples/weather-app/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/examples/weather-app/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png deleted file mode 100644 index 8a31fe2d..00000000 Binary files a/examples/weather-app/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png and /dev/null differ diff --git a/examples/weather-app/app/macos/Runner/Base.lproj/MainMenu.xib b/examples/weather-app/app/macos/Runner/Base.lproj/MainMenu.xib deleted file mode 100644 index 80e867a4..00000000 --- a/examples/weather-app/app/macos/Runner/Base.lproj/MainMenu.xib +++ /dev/null @@ -1,343 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/weather-app/app/macos/Runner/Configs/AppInfo.xcconfig b/examples/weather-app/app/macos/Runner/Configs/AppInfo.xcconfig deleted file mode 100644 index 11e3faa7..00000000 --- a/examples/weather-app/app/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 = app - -// The application's bundle identifier -PRODUCT_BUNDLE_IDENTIFIER = com.example.app - -// The copyright displayed in application information -PRODUCT_COPYRIGHT = Copyright © 2022 com.example. All rights reserved. diff --git a/examples/weather-app/app/macos/Runner/Configs/Debug.xcconfig b/examples/weather-app/app/macos/Runner/Configs/Debug.xcconfig deleted file mode 100644 index 36b0fd94..00000000 --- a/examples/weather-app/app/macos/Runner/Configs/Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "../../Flutter/Flutter-Debug.xcconfig" -#include "Warnings.xcconfig" diff --git a/examples/weather-app/app/macos/Runner/Configs/Release.xcconfig b/examples/weather-app/app/macos/Runner/Configs/Release.xcconfig deleted file mode 100644 index dff4f495..00000000 --- a/examples/weather-app/app/macos/Runner/Configs/Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "../../Flutter/Flutter-Release.xcconfig" -#include "Warnings.xcconfig" diff --git a/examples/weather-app/app/macos/Runner/Configs/Warnings.xcconfig b/examples/weather-app/app/macos/Runner/Configs/Warnings.xcconfig deleted file mode 100644 index 42bcbf47..00000000 --- a/examples/weather-app/app/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/examples/weather-app/app/macos/Runner/DebugProfile.entitlements b/examples/weather-app/app/macos/Runner/DebugProfile.entitlements deleted file mode 100644 index dddb8a30..00000000 --- a/examples/weather-app/app/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/examples/weather-app/app/macos/Runner/Info.plist b/examples/weather-app/app/macos/Runner/Info.plist deleted file mode 100644 index 4789daa6..00000000 --- a/examples/weather-app/app/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/examples/weather-app/app/macos/Runner/MainFlutterWindow.swift b/examples/weather-app/app/macos/Runner/MainFlutterWindow.swift deleted file mode 100644 index 2722837e..00000000 --- a/examples/weather-app/app/macos/Runner/MainFlutterWindow.swift +++ /dev/null @@ -1,15 +0,0 @@ -import Cocoa -import FlutterMacOS - -class MainFlutterWindow: NSWindow { - override func awakeFromNib() { - let flutterViewController = FlutterViewController.init() - let windowFrame = self.frame - self.contentViewController = flutterViewController - self.setFrame(windowFrame, display: true) - - RegisterGeneratedPlugins(registry: flutterViewController) - - super.awakeFromNib() - } -} diff --git a/examples/weather-app/app/macos/Runner/Release.entitlements b/examples/weather-app/app/macos/Runner/Release.entitlements deleted file mode 100644 index 852fa1a4..00000000 --- a/examples/weather-app/app/macos/Runner/Release.entitlements +++ /dev/null @@ -1,8 +0,0 @@ - - - - - com.apple.security.app-sandbox - - - diff --git a/examples/weather-app/app/pubspec.lock b/examples/weather-app/app/pubspec.lock deleted file mode 100644 index 7c3040d7..00000000 --- a/examples/weather-app/app/pubspec.lock +++ /dev/null @@ -1,733 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - api_sdk: - dependency: transitive - description: - path: "../api_sdk" - relative: true - source: path - version: "1.0.0+1" - archive: - dependency: transitive - description: - name: archive - url: "https://pub.dartlang.org" - source: hosted - version: "3.2.2" - args: - dependency: transitive - description: - name: args - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.0" - async: - dependency: transitive - description: - name: async - url: "https://pub.dartlang.org" - source: hosted - version: "2.8.2" - bloc: - dependency: "direct main" - description: - name: bloc - url: "https://pub.dartlang.org" - source: hosted - version: "8.0.3" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - cached_network_image: - dependency: "direct main" - description: - name: cached_network_image - url: "https://pub.dartlang.org" - source: hosted - version: "3.2.0" - cached_network_image_platform_interface: - dependency: transitive - description: - name: cached_network_image_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - cached_network_image_web: - dependency: transitive - description: - name: cached_network_image_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - characters: - dependency: transitive - description: - name: characters - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - clock: - dependency: transitive - description: - name: clock - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - collection: - dependency: transitive - description: - name: collection - url: "https://pub.dartlang.org" - source: hosted - version: "1.15.0" - connectivity_plus: - dependency: transitive - description: - name: connectivity_plus - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.1" - connectivity_plus_linux: - dependency: transitive - description: - name: connectivity_plus_linux - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - connectivity_plus_macos: - dependency: transitive - description: - name: connectivity_plus_macos - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.1" - connectivity_plus_platform_interface: - dependency: transitive - description: - name: connectivity_plus_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_web: - dependency: transitive - description: - name: connectivity_plus_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_windows: - dependency: transitive - description: - name: connectivity_plus_windows - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - crypto: - dependency: transitive - description: - name: crypto - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.4" - dbus: - dependency: transitive - description: - name: dbus - url: "https://pub.dartlang.org" - source: hosted - version: "0.7.1" - equatable: - dependency: "direct main" - description: - name: equatable - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - fake_async: - dependency: transitive - description: - name: fake_async - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - ffi: - dependency: transitive - description: - name: ffi - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.2" - file: - dependency: transitive - description: - name: file - url: "https://pub.dartlang.org" - source: hosted - version: "6.1.2" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_bloc: - dependency: "direct main" - description: - name: flutter_bloc - url: "https://pub.dartlang.org" - source: hosted - version: "8.0.1" - flutter_blurhash: - dependency: transitive - description: - name: flutter_blurhash - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.4" - flutter_cache_manager: - dependency: transitive - description: - name: flutter_cache_manager - url: "https://pub.dartlang.org" - source: hosted - version: "3.3.0" - flutter_native_splash: - dependency: "direct dev" - description: - name: flutter_native_splash - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - fluttertoast: - dependency: "direct main" - description: - name: fluttertoast - url: "https://pub.dartlang.org" - source: hosted - version: "8.0.9" - freezed_annotation: - dependency: transitive - description: - name: freezed_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - gql: - dependency: transitive - description: - name: gql - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.0" - gql_dedupe_link: - dependency: transitive - description: - name: gql_dedupe_link - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - gql_error_link: - dependency: transitive - description: - name: gql_error_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - gql_exec: - dependency: transitive - description: - name: gql_exec - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.0" - gql_http_link: - dependency: transitive - description: - name: gql_http_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.0" - gql_link: - dependency: transitive - description: - name: gql_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.0" - gql_transform_link: - dependency: transitive - description: - name: gql_transform_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - graphql: - dependency: transitive - description: - name: graphql - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.1" - graphql_flutter: - dependency: transitive - description: - name: graphql_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.1" - hive: - dependency: transitive - description: - name: hive - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - http: - dependency: transitive - description: - name: http - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.4" - http_parser: - dependency: transitive - description: - name: http_parser - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.0" - image: - dependency: transitive - description: - name: image - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.3" - js: - dependency: transitive - description: - name: js - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.3" - json_annotation: - dependency: transitive - description: - name: json_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "4.4.0" - matcher: - dependency: transitive - description: - name: matcher - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.11" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.3" - meta: - dependency: "direct main" - description: - name: meta - url: "https://pub.dartlang.org" - source: hosted - version: "1.7.0" - nested: - dependency: transitive - description: - name: nested - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - nm: - dependency: transitive - description: - name: nm - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.0" - normalize: - dependency: transitive - description: - name: normalize - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.0+1" - octo_image: - dependency: transitive - description: - name: octo_image - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - path: - dependency: transitive - description: - name: path - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0" - path_provider: - dependency: transitive - description: - name: path_provider - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.9" - path_provider_android: - dependency: transitive - description: - name: path_provider_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.12" - path_provider_ios: - dependency: transitive - description: - name: path_provider_ios - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.8" - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.5" - path_provider_macos: - dependency: transitive - description: - name: path_provider_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.dartlang.org" - source: hosted - version: "1.11.1" - petitparser: - dependency: transitive - description: - name: petitparser - url: "https://pub.dartlang.org" - source: hosted - version: "4.4.0" - platform: - dependency: transitive - description: - name: platform - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.2" - process: - dependency: transitive - description: - name: process - url: "https://pub.dartlang.org" - source: hosted - version: "4.2.4" - provider: - dependency: "direct main" - description: - name: provider - url: "https://pub.dartlang.org" - source: hosted - version: "6.0.2" - rxdart: - dependency: transitive - description: - name: rxdart - url: "https://pub.dartlang.org" - source: hosted - version: "0.27.3" - shared: - dependency: "direct main" - description: - path: "../shared" - relative: true - source: path - version: "1.0.0+1" - shared_preferences: - dependency: transitive - description: - name: shared_preferences - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.13" - shared_preferences_android: - dependency: transitive - description: - name: shared_preferences_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.11" - shared_preferences_ios: - dependency: transitive - description: - name: shared_preferences_ios - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - shared_preferences_linux: - dependency: transitive - description: - name: shared_preferences_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - shared_preferences_macos: - dependency: transitive - description: - name: shared_preferences_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - shared_preferences_platform_interface: - dependency: transitive - description: - name: shared_preferences_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - shared_preferences_web: - dependency: transitive - description: - name: shared_preferences_web - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - shared_preferences_windows: - dependency: transitive - description: - name: shared_preferences_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_span: - dependency: transitive - description: - name: source_span - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.1" - sqflite: - dependency: transitive - description: - name: sqflite - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.2" - sqflite_common: - dependency: transitive - description: - name: sqflite_common - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.1" - stack_trace: - dependency: transitive - description: - name: stack_trace - url: "https://pub.dartlang.org" - source: hosted - version: "1.10.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - synchronized: - dependency: transitive - description: - name: synchronized - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - test_api: - dependency: transitive - description: - name: test_api - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.8" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - units: - dependency: transitive - description: - name: units - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.7" - universal_io: - dependency: transitive - description: - name: universal_io - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.4" - uuid: - dependency: transitive - description: - name: uuid - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.6" - vector_math: - dependency: transitive - description: - name: vector_math - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - webview_flutter: - dependency: "direct main" - description: - name: webview_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - webview_flutter_android: - dependency: transitive - description: - name: webview_flutter_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.8.3" - webview_flutter_platform_interface: - dependency: transitive - description: - name: webview_flutter_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.1" - webview_flutter_wkwebview: - dependency: transitive - description: - name: webview_flutter_wkwebview - url: "https://pub.dartlang.org" - source: hosted - version: "2.7.1" - win32: - dependency: transitive - description: - name: win32 - url: "https://pub.dartlang.org" - source: hosted - version: "2.4.2" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0+1" - xml: - dependency: transitive - description: - name: xml - url: "https://pub.dartlang.org" - source: hosted - version: "5.3.1" - yaml: - dependency: transitive - description: - name: yaml - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" -sdks: - dart: ">=2.16.0 <3.0.0" - flutter: ">=2.8.0" diff --git a/examples/weather-app/app/pubspec.yaml b/examples/weather-app/app/pubspec.yaml deleted file mode 100644 index 3a4302d2..00000000 --- a/examples/weather-app/app/pubspec.yaml +++ /dev/null @@ -1,92 +0,0 @@ -name: app -description: A new Flutter project. - -# The following line prevents the package from being accidentally published to -# pub.dev using `flutter pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev - -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.0+1 - -environment: - sdk: ">=2.7.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.0 - provider: - webview_flutter: ^3.0.1 - flutter_bloc: ^8.0.1 - meta: ^1.1.6 - bloc: ^8.0.3 - equatable: ^2.0.3 - fluttertoast: ^8.0.9 - cached_network_image: ^3.2.0 - shared: - path: ../shared -dev_dependencies: - flutter_test: - sdk: flutter - flutter_native_splash: ^2.1.1 - -flutter_native_splash: - image: assets/images/logo.png - color: "5E92F3" - android_disable_fullscreen: true -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter. -flutter: - - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. - uses-material-design: true - - # To add assets to your application, add an assets section, like this: - assets: - - assets/images/logo.png - - assets/images/2.0x/logo.png - - assets/images/3.0x/logo.png - # - images/a_dot_ham.jpeg - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware. - - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/assets-and-images/#from-packages - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/custom-fonts/#from-packages \ No newline at end of file diff --git a/examples/weather-app/app/web/favicon.png b/examples/weather-app/app/web/favicon.png deleted file mode 100644 index 8aaa46ac..00000000 Binary files a/examples/weather-app/app/web/favicon.png and /dev/null differ diff --git a/examples/weather-app/app/web/icons/Icon-192.png b/examples/weather-app/app/web/icons/Icon-192.png deleted file mode 100644 index b749bfef..00000000 Binary files a/examples/weather-app/app/web/icons/Icon-192.png and /dev/null differ diff --git a/examples/weather-app/app/web/icons/Icon-512.png b/examples/weather-app/app/web/icons/Icon-512.png deleted file mode 100644 index 88cfd48d..00000000 Binary files a/examples/weather-app/app/web/icons/Icon-512.png and /dev/null differ diff --git a/examples/weather-app/app/web/icons/Icon-maskable-192.png b/examples/weather-app/app/web/icons/Icon-maskable-192.png deleted file mode 100644 index eb9b4d76..00000000 Binary files a/examples/weather-app/app/web/icons/Icon-maskable-192.png and /dev/null differ diff --git a/examples/weather-app/app/web/icons/Icon-maskable-512.png b/examples/weather-app/app/web/icons/Icon-maskable-512.png deleted file mode 100644 index d69c5669..00000000 Binary files a/examples/weather-app/app/web/icons/Icon-maskable-512.png and /dev/null differ diff --git a/examples/weather-app/app/web/index.html b/examples/weather-app/app/web/index.html deleted file mode 100644 index 9a16f36c..00000000 --- a/examples/weather-app/app/web/index.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - app - - - - - - - diff --git a/examples/weather-app/app/web/manifest.json b/examples/weather-app/app/web/manifest.json deleted file mode 100644 index 5620a335..00000000 --- a/examples/weather-app/app/web/manifest.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "app", - "short_name": "app", - "start_url": ".", - "display": "standalone", - "background_color": "#0175C2", - "theme_color": "#0175C2", - "description": "A new Flutter project.", - "orientation": "portrait-primary", - "prefer_related_applications": false, - "icons": [ - { - "src": "icons/Icon-192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "icons/Icon-512.png", - "sizes": "512x512", - "type": "image/png" - }, - { - "src": "icons/Icon-maskable-192.png", - "sizes": "192x192", - "type": "image/png", - "purpose": "maskable" - }, - { - "src": "icons/Icon-maskable-512.png", - "sizes": "512x512", - "type": "image/png", - "purpose": "maskable" - } - ] -} diff --git a/examples/weather-app/app/windows/.gitignore b/examples/weather-app/app/windows/.gitignore deleted file mode 100644 index d492d0d9..00000000 --- a/examples/weather-app/app/windows/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -flutter/ephemeral/ - -# Visual Studio user-specific files. -*.suo -*.user -*.userosscache -*.sln.docstates - -# Visual Studio build-related files. -x64/ -x86/ - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ diff --git a/examples/weather-app/app/windows/CMakeLists.txt b/examples/weather-app/app/windows/CMakeLists.txt deleted file mode 100644 index 9ba329fa..00000000 --- a/examples/weather-app/app/windows/CMakeLists.txt +++ /dev/null @@ -1,95 +0,0 @@ -cmake_minimum_required(VERSION 3.14) -project(app LANGUAGES CXX) - -set(BINARY_NAME "app") - -cmake_policy(SET CMP0063 NEW) - -set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") - -# Configure build options. -get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) -if(IS_MULTICONFIG) - set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" - CACHE STRING "" FORCE) -else() - 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() -endif() - -set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") -set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") -set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") -set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") - -# Use Unicode for all projects. -add_definitions(-DUNICODE -D_UNICODE) - -# Compilation settings that should be applied to most targets. -function(APPLY_STANDARD_SETTINGS TARGET) - target_compile_features(${TARGET} PUBLIC cxx_std_17) - target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") - target_compile_options(${TARGET} PRIVATE /EHsc) - target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") - target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") -endfunction() - -set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") - -# Flutter library and tool build rules. -add_subdirectory(${FLUTTER_MANAGED_DIR}) - -# Application build -add_subdirectory("runner") - -# Generated plugin build rules, which manage building the plugins and adding -# them to the application. -include(flutter/generated_plugins.cmake) - - -# === Installation === -# Support files are copied into place next to the executable, so that it can -# run in place. This is done instead of making a separate bundle (as on Linux) -# so that building and running from within Visual Studio will work. -set(BUILD_BUNDLE_DIR "$") -# Make the "install" step default, as it's required to run. -set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) -if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) -endif() - -set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") -set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") - -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) - -if(PLUGIN_BUNDLED_LIBRARIES) - install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) -endif() - -# 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. -install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" - CONFIGURATIONS Profile;Release - COMPONENT Runtime) diff --git a/examples/weather-app/app/windows/flutter/CMakeLists.txt b/examples/weather-app/app/windows/flutter/CMakeLists.txt deleted file mode 100644 index b2e4bd8d..00000000 --- a/examples/weather-app/app/windows/flutter/CMakeLists.txt +++ /dev/null @@ -1,103 +0,0 @@ -cmake_minimum_required(VERSION 3.14) - -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. -set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") - -# === Flutter Library === -set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") - -# 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/windows/app.so" PARENT_SCOPE) - -list(APPEND FLUTTER_LIBRARY_HEADERS - "flutter_export.h" - "flutter_windows.h" - "flutter_messenger.h" - "flutter_plugin_registrar.h" - "flutter_texture_registrar.h" -) -list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") -add_library(flutter INTERFACE) -target_include_directories(flutter INTERFACE - "${EPHEMERAL_DIR}" -) -target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") -add_dependencies(flutter flutter_assemble) - -# === Wrapper === -list(APPEND CPP_WRAPPER_SOURCES_CORE - "core_implementations.cc" - "standard_codec.cc" -) -list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") -list(APPEND CPP_WRAPPER_SOURCES_PLUGIN - "plugin_registrar.cc" -) -list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") -list(APPEND CPP_WRAPPER_SOURCES_APP - "flutter_engine.cc" - "flutter_view_controller.cc" -) -list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") - -# Wrapper sources needed for a plugin. -add_library(flutter_wrapper_plugin STATIC - ${CPP_WRAPPER_SOURCES_CORE} - ${CPP_WRAPPER_SOURCES_PLUGIN} -) -apply_standard_settings(flutter_wrapper_plugin) -set_target_properties(flutter_wrapper_plugin PROPERTIES - POSITION_INDEPENDENT_CODE ON) -set_target_properties(flutter_wrapper_plugin PROPERTIES - CXX_VISIBILITY_PRESET hidden) -target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) -target_include_directories(flutter_wrapper_plugin PUBLIC - "${WRAPPER_ROOT}/include" -) -add_dependencies(flutter_wrapper_plugin flutter_assemble) - -# Wrapper sources needed for the runner. -add_library(flutter_wrapper_app STATIC - ${CPP_WRAPPER_SOURCES_CORE} - ${CPP_WRAPPER_SOURCES_APP} -) -apply_standard_settings(flutter_wrapper_app) -target_link_libraries(flutter_wrapper_app PUBLIC flutter) -target_include_directories(flutter_wrapper_app PUBLIC - "${WRAPPER_ROOT}/include" -) -add_dependencies(flutter_wrapper_app 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. -set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") -set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) -add_custom_command( - OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} - ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} - ${CPP_WRAPPER_SOURCES_APP} - ${PHONY_OUTPUT} - COMMAND ${CMAKE_COMMAND} -E env - ${FLUTTER_TOOL_ENVIRONMENT} - "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" - windows-x64 $ - VERBATIM -) -add_custom_target(flutter_assemble DEPENDS - "${FLUTTER_LIBRARY}" - ${FLUTTER_LIBRARY_HEADERS} - ${CPP_WRAPPER_SOURCES_CORE} - ${CPP_WRAPPER_SOURCES_PLUGIN} - ${CPP_WRAPPER_SOURCES_APP} -) diff --git a/examples/weather-app/app/windows/flutter/generated_plugin_registrant.cc b/examples/weather-app/app/windows/flutter/generated_plugin_registrant.cc deleted file mode 100644 index 8083d749..00000000 --- a/examples/weather-app/app/windows/flutter/generated_plugin_registrant.cc +++ /dev/null @@ -1,14 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#include "generated_plugin_registrant.h" - -#include - -void RegisterPlugins(flutter::PluginRegistry* registry) { - ConnectivityPlusWindowsPluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin")); -} diff --git a/examples/weather-app/app/windows/flutter/generated_plugin_registrant.h b/examples/weather-app/app/windows/flutter/generated_plugin_registrant.h deleted file mode 100644 index dc139d85..00000000 --- a/examples/weather-app/app/windows/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 RegisterPlugins(flutter::PluginRegistry* registry); - -#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/examples/weather-app/app/windows/flutter/generated_plugins.cmake b/examples/weather-app/app/windows/flutter/generated_plugins.cmake deleted file mode 100644 index ba4a2175..00000000 --- a/examples/weather-app/app/windows/flutter/generated_plugins.cmake +++ /dev/null @@ -1,16 +0,0 @@ -# -# Generated file, do not edit. -# - -list(APPEND FLUTTER_PLUGIN_LIST - connectivity_plus_windows -) - -set(PLUGIN_BUNDLED_LIBRARIES) - -foreach(plugin ${FLUTTER_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows 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) diff --git a/examples/weather-app/app/windows/runner/CMakeLists.txt b/examples/weather-app/app/windows/runner/CMakeLists.txt deleted file mode 100644 index de2d8916..00000000 --- a/examples/weather-app/app/windows/runner/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -cmake_minimum_required(VERSION 3.14) -project(runner LANGUAGES CXX) - -add_executable(${BINARY_NAME} WIN32 - "flutter_window.cpp" - "main.cpp" - "utils.cpp" - "win32_window.cpp" - "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" - "Runner.rc" - "runner.exe.manifest" -) -apply_standard_settings(${BINARY_NAME}) -target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") -target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) -target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") -add_dependencies(${BINARY_NAME} flutter_assemble) diff --git a/examples/weather-app/app/windows/runner/Runner.rc b/examples/weather-app/app/windows/runner/Runner.rc deleted file mode 100644 index 645c9828..00000000 --- a/examples/weather-app/app/windows/runner/Runner.rc +++ /dev/null @@ -1,121 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#pragma code_page(65001) -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "winres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (United States) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""winres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_APP_ICON ICON "resources\\app_icon.ico" - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -#ifdef FLUTTER_BUILD_NUMBER -#define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER -#else -#define VERSION_AS_NUMBER 1,0,0 -#endif - -#ifdef FLUTTER_BUILD_NAME -#define VERSION_AS_STRING #FLUTTER_BUILD_NAME -#else -#define VERSION_AS_STRING "1.0.0" -#endif - -VS_VERSION_INFO VERSIONINFO - FILEVERSION VERSION_AS_NUMBER - PRODUCTVERSION VERSION_AS_NUMBER - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#ifdef _DEBUG - FILEFLAGS VS_FF_DEBUG -#else - FILEFLAGS 0x0L -#endif - FILEOS VOS__WINDOWS32 - FILETYPE VFT_APP - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904e4" - BEGIN - VALUE "CompanyName", "com.example" "\0" - VALUE "FileDescription", "app" "\0" - VALUE "FileVersion", VERSION_AS_STRING "\0" - VALUE "InternalName", "app" "\0" - VALUE "LegalCopyright", "Copyright (C) 2022 com.example. All rights reserved." "\0" - VALUE "OriginalFilename", "app.exe" "\0" - VALUE "ProductName", "app" "\0" - VALUE "ProductVersion", VERSION_AS_STRING "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1252 - END -END - -#endif // English (United States) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED diff --git a/examples/weather-app/app/windows/runner/flutter_window.cpp b/examples/weather-app/app/windows/runner/flutter_window.cpp deleted file mode 100644 index b43b9095..00000000 --- a/examples/weather-app/app/windows/runner/flutter_window.cpp +++ /dev/null @@ -1,61 +0,0 @@ -#include "flutter_window.h" - -#include - -#include "flutter/generated_plugin_registrant.h" - -FlutterWindow::FlutterWindow(const flutter::DartProject& project) - : project_(project) {} - -FlutterWindow::~FlutterWindow() {} - -bool FlutterWindow::OnCreate() { - if (!Win32Window::OnCreate()) { - return false; - } - - RECT frame = GetClientArea(); - - // The size here must match the window dimensions to avoid unnecessary surface - // creation / destruction in the startup path. - flutter_controller_ = std::make_unique( - frame.right - frame.left, frame.bottom - frame.top, project_); - // Ensure that basic setup of the controller was successful. - if (!flutter_controller_->engine() || !flutter_controller_->view()) { - return false; - } - RegisterPlugins(flutter_controller_->engine()); - SetChildContent(flutter_controller_->view()->GetNativeWindow()); - return true; -} - -void FlutterWindow::OnDestroy() { - if (flutter_controller_) { - flutter_controller_ = nullptr; - } - - Win32Window::OnDestroy(); -} - -LRESULT -FlutterWindow::MessageHandler(HWND hwnd, UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept { - // Give Flutter, including plugins, an opportunity to handle window messages. - if (flutter_controller_) { - std::optional result = - flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, - lparam); - if (result) { - return *result; - } - } - - switch (message) { - case WM_FONTCHANGE: - flutter_controller_->engine()->ReloadSystemFonts(); - break; - } - - return Win32Window::MessageHandler(hwnd, message, wparam, lparam); -} diff --git a/examples/weather-app/app/windows/runner/flutter_window.h b/examples/weather-app/app/windows/runner/flutter_window.h deleted file mode 100644 index 6da0652f..00000000 --- a/examples/weather-app/app/windows/runner/flutter_window.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef RUNNER_FLUTTER_WINDOW_H_ -#define RUNNER_FLUTTER_WINDOW_H_ - -#include -#include - -#include - -#include "win32_window.h" - -// A window that does nothing but host a Flutter view. -class FlutterWindow : public Win32Window { - public: - // Creates a new FlutterWindow hosting a Flutter view running |project|. - explicit FlutterWindow(const flutter::DartProject& project); - virtual ~FlutterWindow(); - - protected: - // Win32Window: - bool OnCreate() override; - void OnDestroy() override; - LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, - LPARAM const lparam) noexcept override; - - private: - // The project to run. - flutter::DartProject project_; - - // The Flutter instance hosted by this window. - std::unique_ptr flutter_controller_; -}; - -#endif // RUNNER_FLUTTER_WINDOW_H_ diff --git a/examples/weather-app/app/windows/runner/main.cpp b/examples/weather-app/app/windows/runner/main.cpp deleted file mode 100644 index 4d470b48..00000000 --- a/examples/weather-app/app/windows/runner/main.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include -#include -#include - -#include "flutter_window.h" -#include "utils.h" - -int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, - _In_ wchar_t *command_line, _In_ int show_command) { - // Attach to console when present (e.g., 'flutter run') or create a - // new console when running with a debugger. - if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { - CreateAndAttachConsole(); - } - - // Initialize COM, so that it is available for use in the library and/or - // plugins. - ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); - - flutter::DartProject project(L"data"); - - std::vector command_line_arguments = - GetCommandLineArguments(); - - project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); - - FlutterWindow window(project); - Win32Window::Point origin(10, 10); - Win32Window::Size size(1280, 720); - if (!window.CreateAndShow(L"app", origin, size)) { - return EXIT_FAILURE; - } - window.SetQuitOnClose(true); - - ::MSG msg; - while (::GetMessage(&msg, nullptr, 0, 0)) { - ::TranslateMessage(&msg); - ::DispatchMessage(&msg); - } - - ::CoUninitialize(); - return EXIT_SUCCESS; -} diff --git a/examples/weather-app/app/windows/runner/resource.h b/examples/weather-app/app/windows/runner/resource.h deleted file mode 100644 index 66a65d1e..00000000 --- a/examples/weather-app/app/windows/runner/resource.h +++ /dev/null @@ -1,16 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by Runner.rc -// -#define IDI_APP_ICON 101 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 102 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1001 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/examples/weather-app/app/windows/runner/resources/app_icon.ico b/examples/weather-app/app/windows/runner/resources/app_icon.ico deleted file mode 100644 index c04e20ca..00000000 Binary files a/examples/weather-app/app/windows/runner/resources/app_icon.ico and /dev/null differ diff --git a/examples/weather-app/app/windows/runner/runner.exe.manifest b/examples/weather-app/app/windows/runner/runner.exe.manifest deleted file mode 100644 index c977c4a4..00000000 --- a/examples/weather-app/app/windows/runner/runner.exe.manifest +++ /dev/null @@ -1,20 +0,0 @@ - - - - - PerMonitorV2 - - - - - - - - - - - - - - - diff --git a/examples/weather-app/app/windows/runner/utils.cpp b/examples/weather-app/app/windows/runner/utils.cpp deleted file mode 100644 index d19bdbbc..00000000 --- a/examples/weather-app/app/windows/runner/utils.cpp +++ /dev/null @@ -1,64 +0,0 @@ -#include "utils.h" - -#include -#include -#include -#include - -#include - -void CreateAndAttachConsole() { - if (::AllocConsole()) { - FILE *unused; - if (freopen_s(&unused, "CONOUT$", "w", stdout)) { - _dup2(_fileno(stdout), 1); - } - if (freopen_s(&unused, "CONOUT$", "w", stderr)) { - _dup2(_fileno(stdout), 2); - } - std::ios::sync_with_stdio(); - FlutterDesktopResyncOutputStreams(); - } -} - -std::vector GetCommandLineArguments() { - // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. - int argc; - wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); - if (argv == nullptr) { - return std::vector(); - } - - std::vector command_line_arguments; - - // Skip the first argument as it's the binary name. - for (int i = 1; i < argc; i++) { - command_line_arguments.push_back(Utf8FromUtf16(argv[i])); - } - - ::LocalFree(argv); - - return command_line_arguments; -} - -std::string Utf8FromUtf16(const wchar_t* utf16_string) { - if (utf16_string == nullptr) { - return std::string(); - } - int target_length = ::WideCharToMultiByte( - CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, - -1, nullptr, 0, nullptr, nullptr); - if (target_length == 0) { - return std::string(); - } - std::string utf8_string; - utf8_string.resize(target_length); - int converted_length = ::WideCharToMultiByte( - CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, - -1, utf8_string.data(), - target_length, nullptr, nullptr); - if (converted_length == 0) { - return std::string(); - } - return utf8_string; -} diff --git a/examples/weather-app/app/windows/runner/utils.h b/examples/weather-app/app/windows/runner/utils.h deleted file mode 100644 index 3879d547..00000000 --- a/examples/weather-app/app/windows/runner/utils.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef RUNNER_UTILS_H_ -#define RUNNER_UTILS_H_ - -#include -#include - -// Creates a console for the process, and redirects stdout and stderr to -// it for both the runner and the Flutter library. -void CreateAndAttachConsole(); - -// Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string -// encoded in UTF-8. Returns an empty std::string on failure. -std::string Utf8FromUtf16(const wchar_t* utf16_string); - -// Gets the command line arguments passed in as a std::vector, -// encoded in UTF-8. Returns an empty std::vector on failure. -std::vector GetCommandLineArguments(); - -#endif // RUNNER_UTILS_H_ diff --git a/examples/weather-app/app/windows/runner/win32_window.cpp b/examples/weather-app/app/windows/runner/win32_window.cpp deleted file mode 100644 index c10f08dc..00000000 --- a/examples/weather-app/app/windows/runner/win32_window.cpp +++ /dev/null @@ -1,245 +0,0 @@ -#include "win32_window.h" - -#include - -#include "resource.h" - -namespace { - -constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; - -// The number of Win32Window objects that currently exist. -static int g_active_window_count = 0; - -using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd); - -// Scale helper to convert logical scaler values to physical using passed in -// scale factor -int Scale(int source, double scale_factor) { - return static_cast(source * scale_factor); -} - -// Dynamically loads the |EnableNonClientDpiScaling| from the User32 module. -// This API is only needed for PerMonitor V1 awareness mode. -void EnableFullDpiSupportIfAvailable(HWND hwnd) { - HMODULE user32_module = LoadLibraryA("User32.dll"); - if (!user32_module) { - return; - } - auto enable_non_client_dpi_scaling = - reinterpret_cast( - GetProcAddress(user32_module, "EnableNonClientDpiScaling")); - if (enable_non_client_dpi_scaling != nullptr) { - enable_non_client_dpi_scaling(hwnd); - FreeLibrary(user32_module); - } -} - -} // namespace - -// Manages the Win32Window's window class registration. -class WindowClassRegistrar { - public: - ~WindowClassRegistrar() = default; - - // Returns the singleton registar instance. - static WindowClassRegistrar* GetInstance() { - if (!instance_) { - instance_ = new WindowClassRegistrar(); - } - return instance_; - } - - // Returns the name of the window class, registering the class if it hasn't - // previously been registered. - const wchar_t* GetWindowClass(); - - // Unregisters the window class. Should only be called if there are no - // instances of the window. - void UnregisterWindowClass(); - - private: - WindowClassRegistrar() = default; - - static WindowClassRegistrar* instance_; - - bool class_registered_ = false; -}; - -WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr; - -const wchar_t* WindowClassRegistrar::GetWindowClass() { - if (!class_registered_) { - WNDCLASS window_class{}; - window_class.hCursor = LoadCursor(nullptr, IDC_ARROW); - window_class.lpszClassName = kWindowClassName; - window_class.style = CS_HREDRAW | CS_VREDRAW; - window_class.cbClsExtra = 0; - window_class.cbWndExtra = 0; - window_class.hInstance = GetModuleHandle(nullptr); - window_class.hIcon = - LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); - window_class.hbrBackground = 0; - window_class.lpszMenuName = nullptr; - window_class.lpfnWndProc = Win32Window::WndProc; - RegisterClass(&window_class); - class_registered_ = true; - } - return kWindowClassName; -} - -void WindowClassRegistrar::UnregisterWindowClass() { - UnregisterClass(kWindowClassName, nullptr); - class_registered_ = false; -} - -Win32Window::Win32Window() { - ++g_active_window_count; -} - -Win32Window::~Win32Window() { - --g_active_window_count; - Destroy(); -} - -bool Win32Window::CreateAndShow(const std::wstring& title, - const Point& origin, - const Size& size) { - Destroy(); - - const wchar_t* window_class = - WindowClassRegistrar::GetInstance()->GetWindowClass(); - - const POINT target_point = {static_cast(origin.x), - static_cast(origin.y)}; - HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); - UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); - double scale_factor = dpi / 96.0; - - HWND window = CreateWindow( - window_class, title.c_str(), WS_OVERLAPPEDWINDOW | WS_VISIBLE, - Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), - Scale(size.width, scale_factor), Scale(size.height, scale_factor), - nullptr, nullptr, GetModuleHandle(nullptr), this); - - if (!window) { - return false; - } - - return OnCreate(); -} - -// static -LRESULT CALLBACK Win32Window::WndProc(HWND const window, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept { - if (message == WM_NCCREATE) { - auto window_struct = reinterpret_cast(lparam); - SetWindowLongPtr(window, GWLP_USERDATA, - reinterpret_cast(window_struct->lpCreateParams)); - - auto that = static_cast(window_struct->lpCreateParams); - EnableFullDpiSupportIfAvailable(window); - that->window_handle_ = window; - } else if (Win32Window* that = GetThisFromHandle(window)) { - return that->MessageHandler(window, message, wparam, lparam); - } - - return DefWindowProc(window, message, wparam, lparam); -} - -LRESULT -Win32Window::MessageHandler(HWND hwnd, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept { - switch (message) { - case WM_DESTROY: - window_handle_ = nullptr; - Destroy(); - if (quit_on_close_) { - PostQuitMessage(0); - } - return 0; - - case WM_DPICHANGED: { - auto newRectSize = reinterpret_cast(lparam); - LONG newWidth = newRectSize->right - newRectSize->left; - LONG newHeight = newRectSize->bottom - newRectSize->top; - - SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth, - newHeight, SWP_NOZORDER | SWP_NOACTIVATE); - - return 0; - } - case WM_SIZE: { - RECT rect = GetClientArea(); - if (child_content_ != nullptr) { - // Size and position the child window. - MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, - rect.bottom - rect.top, TRUE); - } - return 0; - } - - case WM_ACTIVATE: - if (child_content_ != nullptr) { - SetFocus(child_content_); - } - return 0; - } - - return DefWindowProc(window_handle_, message, wparam, lparam); -} - -void Win32Window::Destroy() { - OnDestroy(); - - if (window_handle_) { - DestroyWindow(window_handle_); - window_handle_ = nullptr; - } - if (g_active_window_count == 0) { - WindowClassRegistrar::GetInstance()->UnregisterWindowClass(); - } -} - -Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { - return reinterpret_cast( - GetWindowLongPtr(window, GWLP_USERDATA)); -} - -void Win32Window::SetChildContent(HWND content) { - child_content_ = content; - SetParent(content, window_handle_); - RECT frame = GetClientArea(); - - MoveWindow(content, frame.left, frame.top, frame.right - frame.left, - frame.bottom - frame.top, true); - - SetFocus(child_content_); -} - -RECT Win32Window::GetClientArea() { - RECT frame; - GetClientRect(window_handle_, &frame); - return frame; -} - -HWND Win32Window::GetHandle() { - return window_handle_; -} - -void Win32Window::SetQuitOnClose(bool quit_on_close) { - quit_on_close_ = quit_on_close; -} - -bool Win32Window::OnCreate() { - // No-op; provided for subclasses. - return true; -} - -void Win32Window::OnDestroy() { - // No-op; provided for subclasses. -} diff --git a/examples/weather-app/app/windows/runner/win32_window.h b/examples/weather-app/app/windows/runner/win32_window.h deleted file mode 100644 index 17ba4311..00000000 --- a/examples/weather-app/app/windows/runner/win32_window.h +++ /dev/null @@ -1,98 +0,0 @@ -#ifndef RUNNER_WIN32_WINDOW_H_ -#define RUNNER_WIN32_WINDOW_H_ - -#include - -#include -#include -#include - -// A class abstraction for a high DPI-aware Win32 Window. Intended to be -// inherited from by classes that wish to specialize with custom -// rendering and input handling -class Win32Window { - public: - struct Point { - unsigned int x; - unsigned int y; - Point(unsigned int x, unsigned int y) : x(x), y(y) {} - }; - - struct Size { - unsigned int width; - unsigned int height; - Size(unsigned int width, unsigned int height) - : width(width), height(height) {} - }; - - Win32Window(); - virtual ~Win32Window(); - - // Creates and shows a win32 window with |title| and position and size using - // |origin| and |size|. New windows are created on the default monitor. Window - // sizes are specified to the OS in physical pixels, hence to ensure a - // consistent size to will treat the width height passed in to this function - // as logical pixels and scale to appropriate for the default monitor. Returns - // true if the window was created successfully. - bool CreateAndShow(const std::wstring& title, - const Point& origin, - const Size& size); - - // Release OS resources associated with window. - void Destroy(); - - // Inserts |content| into the window tree. - void SetChildContent(HWND content); - - // Returns the backing Window handle to enable clients to set icon and other - // window properties. Returns nullptr if the window has been destroyed. - HWND GetHandle(); - - // If true, closing this window will quit the application. - void SetQuitOnClose(bool quit_on_close); - - // Return a RECT representing the bounds of the current client area. - RECT GetClientArea(); - - protected: - // Processes and route salient window messages for mouse handling, - // size change and DPI. Delegates handling of these to member overloads that - // inheriting classes can handle. - virtual LRESULT MessageHandler(HWND window, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept; - - // Called when CreateAndShow is called, allowing subclass window-related - // setup. Subclasses should return false if setup fails. - virtual bool OnCreate(); - - // Called when Destroy is called. - virtual void OnDestroy(); - - private: - friend class WindowClassRegistrar; - - // OS callback called by message pump. Handles the WM_NCCREATE message which - // is passed when the non-client area is being created and enables automatic - // non-client DPI scaling so that the non-client area automatically - // responsponds to changes in DPI. All other messages are handled by - // MessageHandler. - static LRESULT CALLBACK WndProc(HWND const window, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept; - - // Retrieves a class instance pointer for |window| - static Win32Window* GetThisFromHandle(HWND const window) noexcept; - - bool quit_on_close_ = false; - - // window handle for top level window. - HWND window_handle_ = nullptr; - - // window handle for hosted content. - HWND child_content_ = nullptr; -}; - -#endif // RUNNER_WIN32_WINDOW_H_ diff --git a/examples/weather-app/clean_project.sh b/examples/weather-app/clean_project.sh deleted file mode 100644 index d900326a..00000000 --- a/examples/weather-app/clean_project.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -cd api_sdk -echo "+++++API SDK pub clean+++++" -flutter clean -echo "+++++API SDK done+++++" - - -cd ../shared -echo "+++++Shared pub clean+++++" -flutter clean -echo "+++++Shared done+++++" - -cd ../app -echo "+++++Main app pub clean+++++" -flutter clean -echo "+++++Cleaning done+++++" \ No newline at end of file diff --git a/examples/weather-app/run_script.sh b/examples/weather-app/run_script.sh deleted file mode 100644 index 9f269a83..00000000 --- a/examples/weather-app/run_script.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -cd api_sdk -echo "+++++API SDK pub clean+++++" -flutter clean -echo "+++++API SDK pub get+++++" -flutter pub get -echo "+++++API SDK done+++++" - - -cd ../shared -echo "+++++Shared pub clean+++++" -flutter clean -echo "+++++Shared pub get+++++" -flutter pub get -echo "+++++Shared done+++++" - -cd ../app -echo "+++++Main app pub clean+++++" -flutter clean -echo "+++++Main app pub get+++++" -flutter pub get -echo "+++++Main app run+++++" -flutter run \ No newline at end of file diff --git a/examples/weather-app/shared/.gitignore b/examples/weather-app/shared/.gitignore deleted file mode 100644 index 9d532b18..00000000 --- a/examples/weather-app/shared/.gitignore +++ /dev/null @@ -1,41 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json diff --git a/examples/weather-app/shared/.metadata b/examples/weather-app/shared/.metadata deleted file mode 100644 index 107fcb7b..00000000 --- a/examples/weather-app/shared/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 8874f21e79d7ec66d0457c7ab338348e31b17f1d - channel: stable - -project_type: app diff --git a/examples/weather-app/shared/README.md b/examples/weather-app/shared/README.md deleted file mode 100644 index 25946365..00000000 --- a/examples/weather-app/shared/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# shared - -A new Flutter project. - -## Getting Started - -This project is a starting point for a Flutter application. - -A few resources to get you started if this is your first Flutter project: - -- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) - -For help getting started with Flutter, view our -[online documentation](https://flutter.dev/docs), which offers tutorials, -samples, guidance on mobile development, and a full API reference. diff --git a/examples/weather-app/shared/lib/main.dart b/examples/weather-app/shared/lib/main.dart deleted file mode 100644 index 7fa25194..00000000 --- a/examples/weather-app/shared/lib/main.dart +++ /dev/null @@ -1,7 +0,0 @@ -export 'package:shared/modules/authentication/auth.dart'; -export 'package:shared/modules/authentication/bloc/bloc_controller.dart'; -export 'package:shared/modules/weather_app/bloc/weather_bloc_public.dart'; -export 'package:shared/modules/weather_app/models/weather_model.dart'; -import 'package:shared_preferences/shared_preferences.dart'; - -Future prefs = SharedPreferences.getInstance(); diff --git a/examples/weather-app/shared/lib/modules/authentication/auth.dart b/examples/weather-app/shared/lib/modules/authentication/auth.dart deleted file mode 100644 index 662c0eb7..00000000 --- a/examples/weather-app/shared/lib/modules/authentication/auth.dart +++ /dev/null @@ -1,4 +0,0 @@ -export 'package:shared/modules/authentication/bloc/authentication/authentication_bloc_public.dart'; -export 'package:shared/modules/authentication/models/auth_models_public.dart'; -export 'package:shared/modules/authentication/models/firebase_user.dart'; -export 'package:shared/modules/authentication/resources/authentication_repository.dart'; diff --git a/examples/weather-app/shared/lib/modules/authentication/bloc/authentication/authentication_bloc.dart b/examples/weather-app/shared/lib/modules/authentication/bloc/authentication/authentication_bloc.dart deleted file mode 100644 index 028c91f7..00000000 --- a/examples/weather-app/shared/lib/modules/authentication/bloc/authentication/authentication_bloc.dart +++ /dev/null @@ -1,95 +0,0 @@ -import 'package:bloc/bloc.dart'; -import 'package:shared/main.dart'; -import 'package:shared_preferences/shared_preferences.dart'; - -class AuthenticationBloc - extends Bloc { - final AuthenticationRepository authenticationService = - AuthenticationRepository(); - AuthenticationBloc() : super(AuthenticationInitial()) { - on(_mapAppSignUpLoadedState); - on(_mapUserSignupToState); - on(_mapUserLoginState); - on((event, emit) async { - final SharedPreferences sharedPreferences = await prefs; - sharedPreferences.clear(); - emit(UserLogoutState()); - }); - on((event, emit) async { - final SharedPreferences sharedPreferences = await prefs; - int currentUserId = sharedPreferences.getInt('userId'); - final data = await authenticationService.getUserData(currentUserId ?? 4); - final currentUserData = CurrentUserData.fromJson(data); - emit(SetUserData(currentUserData: currentUserData)); - }); - } - - void _mapAppSignUpLoadedState( - AppLoadedup event, Emitter emit) async { - AuthenticationLoading(); - try { - await Future.delayed(Duration(milliseconds: 500)); // a simulated delay - final SharedPreferences sharedPreferences = await prefs; - if (sharedPreferences.getString('authtoken') != null) { - emit(AppAutheticated()); - } else { - emit(AuthenticationStart()); - } - } catch (e) { - emit(AuthenticationFailure( - message: e.message ?? 'An unknown error occurred')); - } - } - - void _mapUserLoginState( - UserLogin event, Emitter emit) async { - final SharedPreferences sharedPreferences = await prefs; - emit(AuthenticationLoading()); - try { - await Future.delayed(Duration(milliseconds: 500)); // a simulated delay - final data = await authenticationService.loginWithEmailAndPassword( - event.email, event.password); - if (data["error"] == null) { - final currentUser = Token.fromJson(data); - if (currentUser != null) { - sharedPreferences.setString('authtoken', currentUser.token); - emit(AppAutheticated()); - } else { - emit(AuthenticationNotAuthenticated()); - } - } else { - emit(AuthenticationFailure(message: data["error"])); - } - } catch (e) { - emit(AuthenticationFailure( - message: e.toString() ?? 'An unknown error occurred')); - } - } - - void _mapUserSignupToState( - UserSignUp event, Emitter emit) async { - final SharedPreferences sharedPreferences = await prefs; - emit(AuthenticationLoading()); - try { - await Future.delayed(Duration(milliseconds: 500)); // a simulated delay - final data = await authenticationService.signUpWithEmailAndPassword( - event.email, event.password); - - if (data["error"] == null) { - final currentUser = UserData.fromJson(data); - if (currentUser != null) { - sharedPreferences.setString('authtoken', currentUser.token); - sharedPreferences.setInt('userId', currentUser.id); - emit(AppAutheticated()); - } else { - emit(AuthenticationNotAuthenticated()); - } - } else { - emit(AuthenticationFailure(message: data["error"])); - } - } catch (e) { - emit(AuthenticationFailure( - message: e.toString() ?? 'An unknown error occurred')); - } - } -} diff --git a/examples/weather-app/shared/lib/modules/authentication/bloc/authentication/authentication_bloc_public.dart b/examples/weather-app/shared/lib/modules/authentication/bloc/authentication/authentication_bloc_public.dart deleted file mode 100644 index 4ebb9f73..00000000 --- a/examples/weather-app/shared/lib/modules/authentication/bloc/authentication/authentication_bloc_public.dart +++ /dev/null @@ -1,3 +0,0 @@ -export 'package:shared/modules/authentication/bloc/authentication/authentication_bloc.dart'; -export 'package:shared/modules/authentication/bloc/authentication/authentication_event.dart'; -export 'package:shared/modules/authentication/bloc/authentication/authentication_state.dart'; diff --git a/examples/weather-app/shared/lib/modules/authentication/bloc/authentication/authentication_event.dart b/examples/weather-app/shared/lib/modules/authentication/bloc/authentication/authentication_event.dart deleted file mode 100644 index d6f7a93f..00000000 --- a/examples/weather-app/shared/lib/modules/authentication/bloc/authentication/authentication_event.dart +++ /dev/null @@ -1,34 +0,0 @@ -import 'package:meta/meta.dart'; -import 'package:equatable/equatable.dart'; - -abstract class AuthenticationEvent extends Equatable { - const AuthenticationEvent(); - - @override - List get props => []; -} - -// Fired just after the app is launched -class AppLoadedup extends AuthenticationEvent {} - -class UserLogOut extends AuthenticationEvent {} - -class GetUserData extends AuthenticationEvent {} - -class UserSignUp extends AuthenticationEvent { - final String email; - final String password; - UserSignUp({@required this.email, this.password}); - - @override - List get props => [email, password]; -} - -class UserLogin extends AuthenticationEvent { - final String email; - final String password; - UserLogin({@required this.email, this.password}); - - @override - List get props => [email, password]; -} diff --git a/examples/weather-app/shared/lib/modules/authentication/bloc/authentication/authentication_state.dart b/examples/weather-app/shared/lib/modules/authentication/bloc/authentication/authentication_state.dart deleted file mode 100644 index 627616d0..00000000 --- a/examples/weather-app/shared/lib/modules/authentication/bloc/authentication/authentication_state.dart +++ /dev/null @@ -1,38 +0,0 @@ -import 'package:meta/meta.dart'; -import 'package:equatable/equatable.dart'; -import 'package:shared/modules/authentication/models/current_user_data.dart'; - -abstract class AuthenticationState extends Equatable { - const AuthenticationState(); - - @override - List get props => []; -} - -class AppAutheticated extends AuthenticationState {} - -class AuthenticationInitial extends AuthenticationState {} - -class AuthenticationLoading extends AuthenticationState {} - -class AuthenticationStart extends AuthenticationState {} - -class UserLogoutState extends AuthenticationState {} - -class SetUserData extends AuthenticationState { - final CurrentUserData currentUserData; - SetUserData({this.currentUserData}); - @override - List get props => [currentUserData]; -} - -class AuthenticationNotAuthenticated extends AuthenticationState {} - -class AuthenticationFailure extends AuthenticationState { - final String message; - - AuthenticationFailure({@required this.message}); - - @override - List get props => [message]; -} diff --git a/examples/weather-app/shared/lib/modules/authentication/bloc/bloc_controller.dart b/examples/weather-app/shared/lib/modules/authentication/bloc/bloc_controller.dart deleted file mode 100644 index f5cadbc3..00000000 --- a/examples/weather-app/shared/lib/modules/authentication/bloc/bloc_controller.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'package:shared/main.dart'; - -class AuthenticationBlocController { - AuthenticationBlocController._(); - static AuthenticationBlocController _instance = - AuthenticationBlocController._(); - factory AuthenticationBlocController() => _instance; - - // ignore: close_sinks - AuthenticationBloc authenticationBloc = AuthenticationBloc(); -} diff --git a/examples/weather-app/shared/lib/modules/authentication/models/auth_models_public.dart b/examples/weather-app/shared/lib/modules/authentication/models/auth_models_public.dart deleted file mode 100644 index 040c2e1b..00000000 --- a/examples/weather-app/shared/lib/modules/authentication/models/auth_models_public.dart +++ /dev/null @@ -1,4 +0,0 @@ -export 'package:shared/modules/authentication/models/token.dart'; -export 'package:shared/modules/authentication/models/user.dart'; -export 'package:shared/modules/authentication/models/user_data.dart'; -export 'package:shared/modules/authentication/models/current_user_data.dart'; diff --git a/examples/weather-app/shared/lib/modules/authentication/models/current_user_data.dart b/examples/weather-app/shared/lib/modules/authentication/models/current_user_data.dart deleted file mode 100644 index b4f7fdb6..00000000 --- a/examples/weather-app/shared/lib/modules/authentication/models/current_user_data.dart +++ /dev/null @@ -1,77 +0,0 @@ -class CurrentUserData { - Data data; - Ad ad; - - CurrentUserData({this.data, this.ad}); - - CurrentUserData.fromJson(Map json) { - data = json['data'] != null ? new Data.fromJson(json['data']) : Data(); - ad = json['ad'] != null ? new Ad.fromJson(json['ad']) : Ad(); - } - - Map toJson() { - final Map data = new Map(); - if (this.data != null) { - data['data'] = this.data.toJson(); - } - if (this.ad != null) { - data['ad'] = this.ad.toJson(); - } - return data; - } -} - -class Data { - int id; - String email; - String firstName; - String lastName; - String avatar; - - Data( - {this.id, - this.email = '', - this.firstName = '', - this.lastName = '', - this.avatar = ''}); - - Data.fromJson(Map json) { - id = json['id']; - email = json['email']; - firstName = json['first_name']; - lastName = json['last_name']; - avatar = json['avatar']; - } - - Map toJson() { - final Map data = new Map(); - data['id'] = this.id; - data['email'] = this.email; - data['first_name'] = this.firstName; - data['last_name'] = this.lastName; - data['avatar'] = this.avatar; - return data; - } -} - -class Ad { - String company; - String url; - String text; - - Ad({this.company = '', this.url = '', this.text = ''}); - - Ad.fromJson(Map json) { - company = json['company']; - url = json['url']; - text = json['text']; - } - - Map toJson() { - final Map data = new Map(); - data['company'] = this.company; - data['url'] = this.url; - data['text'] = this.text; - return data; - } -} diff --git a/examples/weather-app/shared/lib/modules/authentication/models/firebase_user.dart b/examples/weather-app/shared/lib/modules/authentication/models/firebase_user.dart deleted file mode 100644 index 21d507ca..00000000 --- a/examples/weather-app/shared/lib/modules/authentication/models/firebase_user.dart +++ /dev/null @@ -1,14 +0,0 @@ -class UserFromFirebaseUser { - final String uid; - final String email; - final String token; - final String avatar; - - UserFromFirebaseUser({ - this.uid, - this.email, - this.token, - this.avatar = - "https://i.pinimg.com/736x/89/90/48/899048ab0cc455154006fdb9676964b3.jpg", - }); -} diff --git a/examples/weather-app/shared/lib/modules/authentication/models/user.dart b/examples/weather-app/shared/lib/modules/authentication/models/user.dart deleted file mode 100644 index 739c8a04..00000000 --- a/examples/weather-app/shared/lib/modules/authentication/models/user.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'package:meta/meta.dart'; - -class MyUser { - final String name; - final String email; - - MyUser({@required this.name, @required this.email}); - - @override - String toString() => 'User { name: $name, email: $email}'; -} diff --git a/examples/weather-app/shared/lib/modules/authentication/models/user_data.dart b/examples/weather-app/shared/lib/modules/authentication/models/user_data.dart deleted file mode 100644 index 1ef23e6c..00000000 --- a/examples/weather-app/shared/lib/modules/authentication/models/user_data.dart +++ /dev/null @@ -1,18 +0,0 @@ -class UserData { - int id; - String token; - - UserData({this.id, this.token}); - - UserData.fromJson(Map json) { - id = json['id']; - token = json['token']; - } - - Map toJson() { - final Map data = new Map(); - data['id'] = this.id; - data['token'] = this.token; - return data; - } -} diff --git a/examples/weather-app/shared/lib/modules/authentication/resources/authentication_repository.dart b/examples/weather-app/shared/lib/modules/authentication/resources/authentication_repository.dart deleted file mode 100644 index 16671e39..00000000 --- a/examples/weather-app/shared/lib/modules/authentication/resources/authentication_repository.dart +++ /dev/null @@ -1,27 +0,0 @@ -import 'package:api_sdk/main.dart'; - -class AuthenticationRepository { - Future signUpWithEmailAndPassword( - String email, String password) async { - await Future.delayed(Duration(seconds: 1)); // simulate a network delay - final response = await ApiSdk.signUpWithEmailAndPassword( - {'email': email, 'password': password}); - - return response; - } - - Future loginWithEmailAndPassword( - String email, String password) async { - await Future.delayed(Duration(seconds: 1)); // simulate a network delay - final response = await ApiSdk.loginWithEmailAndPassword( - {'email': email, 'password': password}); - - return response; - } - - Future getUserData(int id) async { - final response = await ApiSdk.getUserData(id); - - return response; - } -} diff --git a/examples/weather-app/shared/lib/modules/weather_app/bloc/weather_bloc.dart b/examples/weather-app/shared/lib/modules/weather_app/bloc/weather_bloc.dart deleted file mode 100644 index bb143341..00000000 --- a/examples/weather-app/shared/lib/modules/weather_app/bloc/weather_bloc.dart +++ /dev/null @@ -1,29 +0,0 @@ -import 'package:bloc/bloc.dart'; -import 'package:shared/main.dart'; -import 'package:shared/modules/weather_app/resources/weather_resources.dart'; - -class WeatherBloc extends Bloc { - WeatherApiRepository weatherApiRepository = WeatherApiRepository(); - WeatherBloc() : super(InitialSuccessState()) { - on(onSearchClickedEvent); - } - - onSearchClickedEvent( - SearchClickedEvent event, Emitter emit) async { - emit(LoadingState()); - try { - final response = await weatherApiRepository.fetchWeather(event.city); - if (response["cod"] != 200) { - emit(FailureState( - message: response['message'], - cod: response['cod'], - )); - } else { - WeatherModel weatherModel = WeatherModel.fromJson(response); - emit(SearchSuccessState(weatherModel: weatherModel)); - } - } catch (e) { - FailureState(message: e); - } - } -} diff --git a/examples/weather-app/shared/lib/modules/weather_app/bloc/weather_bloc_public.dart b/examples/weather-app/shared/lib/modules/weather_app/bloc/weather_bloc_public.dart deleted file mode 100644 index e3acaa34..00000000 --- a/examples/weather-app/shared/lib/modules/weather_app/bloc/weather_bloc_public.dart +++ /dev/null @@ -1,3 +0,0 @@ -export 'package:shared/modules/weather_app/bloc/weather_bloc.dart'; -export 'package:shared/modules/weather_app/bloc/weather_events.dart'; -export 'package:shared/modules/weather_app/bloc/weather_states.dart'; diff --git a/examples/weather-app/shared/lib/modules/weather_app/bloc/weather_events.dart b/examples/weather-app/shared/lib/modules/weather_app/bloc/weather_events.dart deleted file mode 100644 index f290e134..00000000 --- a/examples/weather-app/shared/lib/modules/weather_app/bloc/weather_events.dart +++ /dev/null @@ -1,12 +0,0 @@ -import 'package:equatable/equatable.dart'; - -abstract class WeatherEvents extends Equatable { - @override - List get props => throw UnimplementedError(); -} - -class SearchClickedEvent extends WeatherEvents { - final String city; - - SearchClickedEvent({this.city}); -} diff --git a/examples/weather-app/shared/lib/modules/weather_app/bloc/weather_states.dart b/examples/weather-app/shared/lib/modules/weather_app/bloc/weather_states.dart deleted file mode 100644 index e00b0809..00000000 --- a/examples/weather-app/shared/lib/modules/weather_app/bloc/weather_states.dart +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:equatable/equatable.dart'; -import 'package:shared/modules/weather_app/models/weather_model.dart'; - -abstract class WeatherStates extends Equatable { - @override - List get props => throw UnimplementedError(); -} - -class InitialSuccessState extends WeatherStates {} - -class SearchSuccessState extends WeatherStates { - final WeatherModel weatherModel; - SearchSuccessState({this.weatherModel}); -} - -class LoadingState extends WeatherStates {} - -class FailureState extends WeatherStates { - final dynamic message; - final String cod; - FailureState({this.message, this.cod}); -} diff --git a/examples/weather-app/shared/lib/modules/weather_app/models/weather_model.dart b/examples/weather-app/shared/lib/modules/weather_app/models/weather_model.dart deleted file mode 100644 index 60ad6b9d..00000000 --- a/examples/weather-app/shared/lib/modules/weather_app/models/weather_model.dart +++ /dev/null @@ -1,26 +0,0 @@ -class WeatherModel { - dynamic lon; - dynamic lat; - String mainWeather; - String description; - String temp; - String minTemp; - String maxTemp; - dynamic windSpeed; - String countryCode; - String cityName; - String icon; - - WeatherModel.fromJson(Map parsedJson) - : lon = parsedJson['coord']['lon'], - lat = parsedJson['coord']['lat'], - mainWeather = parsedJson['weather'][0]['main'], - description = parsedJson['weather'][0]['description'], - temp = (parsedJson['main']['temp'] - 273.15).toStringAsFixed(2), - minTemp = (parsedJson['main']['temp_min'] - 273.15).toStringAsFixed(2), - maxTemp = (parsedJson['main']['temp_max'] - 273.15).toStringAsFixed(2), - windSpeed = parsedJson['wind']['speed'], - countryCode = parsedJson['sys']['country'], - cityName = parsedJson['name'], - icon = parsedJson["weather"][0]["icon"]; -} diff --git a/examples/weather-app/shared/lib/modules/weather_app/resources/weather_resources.dart b/examples/weather-app/shared/lib/modules/weather_app/resources/weather_resources.dart deleted file mode 100644 index fac3da2d..00000000 --- a/examples/weather-app/shared/lib/modules/weather_app/resources/weather_resources.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'dart:developer'; - -import 'package:api_sdk/main.dart'; - -class WeatherApiRepository { - Future fetchWeather(String city) async { - final response = await ApiSdk.getWeatherforCity(city); - inspect(response); - return response; - } -} diff --git a/examples/weather-app/shared/pubspec.lock b/examples/weather-app/shared/pubspec.lock deleted file mode 100644 index 2f4ea7fb..00000000 --- a/examples/weather-app/shared/pubspec.lock +++ /dev/null @@ -1,607 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - api_sdk: - dependency: "direct main" - description: - path: "../api_sdk" - relative: true - source: path - version: "1.0.0+1" - args: - dependency: transitive - description: - name: args - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.0" - async: - dependency: transitive - description: - name: async - url: "https://pub.dartlang.org" - source: hosted - version: "2.8.2" - bloc: - dependency: "direct main" - description: - name: bloc - url: "https://pub.dartlang.org" - source: hosted - version: "8.0.3" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - characters: - dependency: transitive - description: - name: characters - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - clock: - dependency: transitive - description: - name: clock - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - collection: - dependency: transitive - description: - name: collection - url: "https://pub.dartlang.org" - source: hosted - version: "1.15.0" - connectivity_plus: - dependency: transitive - description: - name: connectivity_plus - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.1" - connectivity_plus_linux: - dependency: transitive - description: - name: connectivity_plus_linux - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - connectivity_plus_macos: - dependency: transitive - description: - name: connectivity_plus_macos - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.1" - connectivity_plus_platform_interface: - dependency: transitive - description: - name: connectivity_plus_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_web: - dependency: transitive - description: - name: connectivity_plus_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_windows: - dependency: transitive - description: - name: connectivity_plus_windows - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - crypto: - dependency: transitive - description: - name: crypto - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.4" - dbus: - dependency: transitive - description: - name: dbus - url: "https://pub.dartlang.org" - source: hosted - version: "0.7.1" - equatable: - dependency: "direct main" - description: - name: equatable - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - fake_async: - dependency: transitive - description: - name: fake_async - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - ffi: - dependency: transitive - description: - name: ffi - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.2" - file: - dependency: transitive - description: - name: file - url: "https://pub.dartlang.org" - source: hosted - version: "6.1.2" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_bloc: - dependency: "direct main" - description: - name: flutter_bloc - url: "https://pub.dartlang.org" - source: hosted - version: "8.0.1" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - freezed_annotation: - dependency: transitive - description: - name: freezed_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - gql: - dependency: transitive - description: - name: gql - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.0" - gql_dedupe_link: - dependency: transitive - description: - name: gql_dedupe_link - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - gql_error_link: - dependency: transitive - description: - name: gql_error_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - gql_exec: - dependency: transitive - description: - name: gql_exec - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.0" - gql_http_link: - dependency: transitive - description: - name: gql_http_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.0" - gql_link: - dependency: transitive - description: - name: gql_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.0" - gql_transform_link: - dependency: transitive - description: - name: gql_transform_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - graphql: - dependency: transitive - description: - name: graphql - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.1" - graphql_flutter: - dependency: transitive - description: - name: graphql_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.1" - hive: - dependency: transitive - description: - name: hive - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - http: - dependency: transitive - description: - name: http - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.4" - http_parser: - dependency: transitive - description: - name: http_parser - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.0" - js: - dependency: transitive - description: - name: js - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.3" - json_annotation: - dependency: transitive - description: - name: json_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "4.4.0" - matcher: - dependency: transitive - description: - name: matcher - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.11" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.3" - meta: - dependency: transitive - description: - name: meta - url: "https://pub.dartlang.org" - source: hosted - version: "1.7.0" - nested: - dependency: transitive - description: - name: nested - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - nm: - dependency: transitive - description: - name: nm - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.0" - normalize: - dependency: transitive - description: - name: normalize - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.0+1" - path: - dependency: transitive - description: - name: path - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0" - path_provider: - dependency: "direct main" - description: - name: path_provider - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.9" - path_provider_android: - dependency: transitive - description: - name: path_provider_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.12" - path_provider_ios: - dependency: transitive - description: - name: path_provider_ios - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.8" - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.5" - path_provider_macos: - dependency: transitive - description: - name: path_provider_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - petitparser: - dependency: transitive - description: - name: petitparser - url: "https://pub.dartlang.org" - source: hosted - version: "4.4.0" - platform: - dependency: transitive - description: - name: platform - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.2" - process: - dependency: transitive - description: - name: process - url: "https://pub.dartlang.org" - source: hosted - version: "4.2.4" - provider: - dependency: transitive - description: - name: provider - url: "https://pub.dartlang.org" - source: hosted - version: "6.0.2" - rxdart: - dependency: "direct main" - description: - name: rxdart - url: "https://pub.dartlang.org" - source: hosted - version: "0.27.3" - shared_preferences: - dependency: "direct main" - description: - name: shared_preferences - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.13" - shared_preferences_android: - dependency: transitive - description: - name: shared_preferences_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.11" - shared_preferences_ios: - dependency: transitive - description: - name: shared_preferences_ios - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - shared_preferences_linux: - dependency: transitive - description: - name: shared_preferences_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - shared_preferences_macos: - dependency: transitive - description: - name: shared_preferences_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - shared_preferences_platform_interface: - dependency: transitive - description: - name: shared_preferences_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - shared_preferences_web: - dependency: transitive - description: - name: shared_preferences_web - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - shared_preferences_windows: - dependency: transitive - description: - name: shared_preferences_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_span: - dependency: transitive - description: - name: source_span - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.1" - sqflite: - dependency: "direct main" - description: - name: sqflite - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.2" - sqflite_common: - dependency: transitive - description: - name: sqflite_common - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.1" - stack_trace: - dependency: transitive - description: - name: stack_trace - url: "https://pub.dartlang.org" - source: hosted - version: "1.10.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - synchronized: - dependency: transitive - description: - name: synchronized - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - test_api: - dependency: transitive - description: - name: test_api - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.8" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - units: - dependency: "direct main" - description: - name: units - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.7" - uuid: - dependency: transitive - description: - name: uuid - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.6" - vector_math: - dependency: transitive - description: - name: vector_math - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - win32: - dependency: transitive - description: - name: win32 - url: "https://pub.dartlang.org" - source: hosted - version: "2.4.2" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0+1" - xml: - dependency: transitive - description: - name: xml - url: "https://pub.dartlang.org" - source: hosted - version: "5.3.1" -sdks: - dart: ">=2.16.0 <3.0.0" - flutter: ">=2.8.0" diff --git a/examples/weather-app/shared/pubspec.yaml b/examples/weather-app/shared/pubspec.yaml deleted file mode 100644 index 80c88a26..00000000 --- a/examples/weather-app/shared/pubspec.yaml +++ /dev/null @@ -1,85 +0,0 @@ -name: shared -description: A new Flutter project. - -# The following line prevents the package from being accidentally published to -# pub.dev using `pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev - -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.0+1 - -environment: - sdk: ">=2.7.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.0 - sqflite: ^2.0.2 - path_provider: ^2.0.9 - rxdart: ^0.27.3 - bloc: ^8.0.3 - flutter_bloc: ^8.0.1 - equatable: ^2.0.3 - units: ^0.0.7 - shared_preferences: ^2.0.13 - api_sdk: - path: ../api_sdk -dev_dependencies: - flutter_test: - sdk: flutter - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter. -flutter: - - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. - uses-material-design: true - - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware. - - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/assets-and-images/#from-packages - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/custom-fonts/#from-packages diff --git a/examples/weather-app/shared/test/widget_test.dart b/examples/weather-app/shared/test/widget_test.dart deleted file mode 100644 index 570e0e47..00000000 --- a/examples/weather-app/shared/test/widget_test.dart +++ /dev/null @@ -1,8 +0,0 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility that Flutter provides. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - -void main() {} diff --git a/examples/weather-app/weather-app.gif b/examples/weather-app/weather-app.gif deleted file mode 100644 index 7f97298e..00000000 Binary files a/examples/weather-app/weather-app.gif and /dev/null differ diff --git a/flutter_starter.gif b/flutter_starter.gif new file mode 100644 index 00000000..3a51dbe4 Binary files /dev/null and b/flutter_starter.gif differ diff --git a/flutter_starter_kit.gif b/flutter_starter_kit.gif deleted file mode 100644 index fb503f1c..00000000 Binary files a/flutter_starter_kit.gif and /dev/null differ diff --git a/folder_structure.md b/folder_structure.md new file mode 100644 index 00000000..c7a861f0 --- /dev/null +++ b/folder_structure.md @@ -0,0 +1,116 @@ +### Folder Structure : + +We are trying to set up a well-defined folder structure so that you can easily navigate through the application and add files wherever needed. + +The current folder structure: + +lib + +- api_sdk +- config +- l10n (localisation) +- routes +- screens +- shared +- themes +- utils +- widgets + +#### api_sdk : + +This folder will contain various api services, so that you can choose between any of the mentioned services in the CLI and the folder of that specific service will be injected into api_sdk folder. Each service has its base set up and will have basic network calls in order to give a gist of how it works to the developer. + +Current folder structure of api_sdk looks like: + +- api_sdk + + - dio + + - dio_helpers + - dio_apis.dart + - dio_client.dart + - dio_client.g.dart + - dio_exceptions.dart + - dio_interceptor.dart + - models + - user_model.dart + - user_model.g.dart + - dio_api_sdk.dart + - [README.md](lib/api_sdk/dio/README.md) + + - http + + - http_helpers + - http_client.dart + - http_exception.dart + - http_api_sdk.dart + - [README.md](lib/api_sdk/http/README.md) + +#### **l10n (localisation):** + +If you build an app for different markets, you will most likely need to support multiple languages for your end-users, hence we have added localisation as a basic set up. Right now, 3 languages have been added in our localisation folder but you can add more according to your use case: + +- English +- Spanish +- French + +#### Routes**:** + +An app has to display multiple screens depending upon the developer's needs. Hence we need different set of routes to display those screens. We have set up a basic file (routes.dart) in which we are demonstrating how you can set-up routes of your application. We have added **go_router** as a dependency for routing so that same application can be run on flutter_web too, but if you want you can use basic routing as well by just uncommenting the code and using it as per requirements. + +#### Screens: + +The whole UI of the application can be placed under this folder. For the starter kit we will be providing a basic sign in/ sign up screen along with a home screen. You can also do a fresh start by deleting all these files but since sign in/ sign up screens are almost a part of every application hence will be provided under basic UI. + +Folder structure will be like : + +- screens + - home + - home.dart + - splash + - splash.dart + - signup + - widgets + - signup_form.dart + - signup_screen.dart + - login + - widgets + - login_form.dart + - login_screen.dart + +#### Themes: + +Theme of the whole application will be derived from here. A basic theme set up including interchanging of light and dark theme will be there. You can add n amount of colours, font sizes, text theme, etc to maintain the theme of your application. + +We have two files in the themes folder, one where you can set up the whole theme of the application i.e **theme_data.dart** and the other one is **color_constants.dart** where you can define all the colours that will be used in **theme_data.dart**. + +#### Shared: + +Shared folder will have the code for state management. At initial stage, we will be providing BLoC as the default state management library and Provider as an option for you to choose. + +- **BLoC :** Flutter bloc is quite **simple** and easy to understand, it has a very good documentation with tons of examples and also, is one of the most used in the flutter community. +- **Provider** : The provider package is an easy to use package **which is basically a wrapper around the InheritedWidgets** that makes it easier to use and manage. + +The folder structure will be like: + +- shared + - bloc + - authentication + - authentication_bloc.dart + - authentication_event.dart + - authentication_state.dart + - update_theme + - update_theme_bloc.dart + - update_theme_state.dart + - update_theme_event.dart + - provider + - authentication_provider.dart + - base_provider.dart + - theme_provider.dart + - repository + - dio_authentication_repository.dart + - http_authentication_repository.dart + +#### Utils: + +Utils folder will contain the common files like **size_utils.dart** which will be responsible for the responsive UI of the application. You won’t have to use MediaQuery in every file. diff --git a/github_repo_list.gif b/github_repo_list.gif deleted file mode 100644 index a865aec8..00000000 Binary files a/github_repo_list.gif and /dev/null differ diff --git a/hacker_news.gif b/hacker_news.gif deleted file mode 100644 index 6486972c..00000000 Binary files a/hacker_news.gif and /dev/null differ diff --git a/integration_test/app_test.dart b/integration_test/app_test.dart new file mode 100644 index 00000000..bfa4f6cb --- /dev/null +++ b/integration_test/app_test.dart @@ -0,0 +1,106 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_starter/common_export.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:integration_test/integration_test.dart'; + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + late final AuthenticationBloc authenticationBloc; + late final UpdateThemeBloc updateThemeBloc; + late final AuthenticationRepository authenticationService; + + setUpAll(() async { + await SharedPrefs.instance.init(); + authenticationService = AuthenticationRepository(); + updateThemeBloc = UpdateThemeBloc(); + authenticationBloc = AuthenticationBloc( + authenticationService: authenticationService, + ); + }); + + tearDownAll(() { + authenticationBloc.close(); + updateThemeBloc.close(); + }); + + Widget createWidget(Widget child) { + return MaterialApp( + debugShowCheckedModeBanner: false, + home: Builder(builder: (context) { + UiSizeConfig().init(context); + return MultiBlocProvider( + providers: [ + BlocProvider.value(value: authenticationBloc), + BlocProvider.value(value: updateThemeBloc), + ], + child: child, + ); + }), + ); + } + + group('Flutter starter', () { + testWidgets('Complete app test', (tester) async { + await tester.pumpWidget(createWidget(const App())); + + await tester.pumpAndSettle(); + await Future.delayed(const Duration(milliseconds: 500)); + await tester.pumpAndSettle(); + + final Finder email = find.byKey(const Key('emailField')); + final Finder password = find.byKey(const Key('passwordField')); + final Finder login = find.byKey(const Key('loginButton')); + final Finder theme = find.byKey(const Key('themeSwitch')); + final Finder logout = find.byKey(const Key('logoutButton')); + + /// Empty + await tester.enterText(email, ''); + await tester.enterText(password, ''); + + await tester.tap(login); + await tester.pumpAndSettle(); + + expect(authenticationBloc.state, const AuthenticationStart()); + + /// Invalid + await tester.enterText(email, 'test@gmail.com'); + await tester.enterText(password, 'test1234'); + + await tester.tap(login); + await tester.pumpAndSettle(); + + expect( + authenticationBloc.state, + const AuthenticationFailure( + message: 'Invalid Request: {"error":"user not found"}'), + ); + + /// Login + await tester.enterText(email, 'eve.holt@reqres.in'); + await tester.enterText(password, 'cityslicka'); + + await tester.tap(login); + await tester.pumpAndSettle(); + + /// Theme + final ScaffoldState state = tester.firstState(find.byType(Scaffold)); + state.openDrawer(); + await tester.pumpAndSettle(); + await tester.tap(theme); + await tester.pumpAndSettle(); + + state.closeDrawer(); + await tester.pumpAndSettle(); + + expect(updateThemeBloc.state, const SetTheme(appTheme: AppTheme.dark)); + + /// Logout + await tester.tap(logout); + await tester.pumpAndSettle(); + + expect(authenticationBloc.state, const UserLogoutState()); + }); + }); +} diff --git a/examples/book-store-firebase/app/ios/.gitignore b/ios/.gitignore similarity index 100% rename from examples/book-store-firebase/app/ios/.gitignore rename to ios/.gitignore diff --git a/examples/weather-app/app/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist similarity index 96% rename from examples/weather-app/app/ios/Flutter/AppFrameworkInfo.plist rename to ios/Flutter/AppFrameworkInfo.plist index 8d4492f9..9625e105 100644 --- a/examples/weather-app/app/ios/Flutter/AppFrameworkInfo.plist +++ b/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 9.0 + 11.0 diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig new file mode 100644 index 00000000..ec97fc6f --- /dev/null +++ b/ios/Flutter/Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "Generated.xcconfig" diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig new file mode 100644 index 00000000..c4855bfe --- /dev/null +++ b/ios/Flutter/Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "Generated.xcconfig" diff --git a/app/ios/Podfile b/ios/Podfile similarity index 98% rename from app/ios/Podfile rename to ios/Podfile index 1e8c3c90..313ea4a1 100644 --- a/app/ios/Podfile +++ b/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '9.0' +platform :ios, '11.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/ios/Podfile.lock b/ios/Podfile.lock new file mode 100644 index 00000000..37d7c0fc --- /dev/null +++ b/ios/Podfile.lock @@ -0,0 +1,59 @@ +PODS: + - Flutter (1.0.0) + - flutter_native_splash (0.0.1): + - Flutter + - fluttertoast (0.0.2): + - Flutter + - Toast + - FMDB (2.7.5): + - FMDB/standard (= 2.7.5) + - FMDB/standard (2.7.5) + - path_provider_ios (0.0.1): + - Flutter + - shared_preferences_ios (0.0.1): + - Flutter + - sqflite (0.0.2): + - Flutter + - FMDB (>= 2.7.5) + - Toast (4.0.0) + +DEPENDENCIES: + - Flutter (from `Flutter`) + - flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`) + - fluttertoast (from `.symlinks/plugins/fluttertoast/ios`) + - path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`) + - shared_preferences_ios (from `.symlinks/plugins/shared_preferences_ios/ios`) + - sqflite (from `.symlinks/plugins/sqflite/ios`) + +SPEC REPOS: + trunk: + - FMDB + - Toast + +EXTERNAL SOURCES: + Flutter: + :path: Flutter + flutter_native_splash: + :path: ".symlinks/plugins/flutter_native_splash/ios" + fluttertoast: + :path: ".symlinks/plugins/fluttertoast/ios" + path_provider_ios: + :path: ".symlinks/plugins/path_provider_ios/ios" + shared_preferences_ios: + :path: ".symlinks/plugins/shared_preferences_ios/ios" + sqflite: + :path: ".symlinks/plugins/sqflite/ios" + +SPEC CHECKSUMS: + Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 + flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef + fluttertoast: 16fbe6039d06a763f3533670197d01fc73459037 + FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a + path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02 + shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad + sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904 + Toast: 91b396c56ee72a5790816f40d3a94dd357abc196 + +PODFILE CHECKSUM: 7368163408c647b7eb699d0d788ba6718e18fb8d + +COCOAPODS: 1.11.3 diff --git a/app/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj similarity index 89% rename from app/ios/Runner.xcodeproj/project.pbxproj rename to ios/Runner.xcodeproj/project.pbxproj index 281b1651..857873d7 100644 --- a/app/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -3,18 +3,17 @@ archiveVersion = 1; classes = { }; - objectVersion = 51; + objectVersion = 50; objects = { /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 2329B0CD267C88F100F17251 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 2329B0CC267C88F100F17251 /* GoogleService-Info.plist */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 96B4905726F45C2D9B05EDF0 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90E2746B12027798B0662130 /* Pods_Runner.framework */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; - B4B4E2F8ECEA005BE6F70904 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 826890D8F9778E8DFE54EF2F /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -33,14 +32,13 @@ /* Begin PBXFileReference section */ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 2329B0CC267C88F100F17251 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; - 3316A2A33E9987B9B2C02BDD /* 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 = ""; }; - 338A666A7DF4DBC792E4F421 /* 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 = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 4A63F70A590EEC2C31E49E53 /* 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 = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 826890D8F9778E8DFE54EF2F /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 90E2746B12027798B0662130 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 91B24820E83830628E56E6F1 /* 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 = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -48,7 +46,7 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - FE30C97ED31EFC97BAD9ADE1 /* 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 = ""; }; + D936D17513099C123DDF7A65 /* 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 = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -56,23 +54,13 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - B4B4E2F8ECEA005BE6F70904 /* Pods_Runner.framework in Frameworks */, + 96B4905726F45C2D9B05EDF0 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 83D4A229A593E56E8C13711F /* Pods */ = { - isa = PBXGroup; - children = ( - 338A666A7DF4DBC792E4F421 /* Pods-Runner.debug.xcconfig */, - FE30C97ED31EFC97BAD9ADE1 /* Pods-Runner.release.xcconfig */, - 3316A2A33E9987B9B2C02BDD /* Pods-Runner.profile.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -90,8 +78,8 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, - 83D4A229A593E56E8C13711F /* Pods */, - A24D8323BF0C32CF02A97271 /* Frameworks */, + F61B79B65E4ED1DCA6E50A2C /* Pods */, + C7ED4B9403C7740748C190CE /* Frameworks */, ); sourceTree = ""; }; @@ -110,7 +98,6 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */, 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 97C147021CF9000F007C117D /* Info.plist */, - 2329B0CC267C88F100F17251 /* GoogleService-Info.plist */, 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, @@ -119,14 +106,25 @@ path = Runner; sourceTree = ""; }; - A24D8323BF0C32CF02A97271 /* Frameworks */ = { + C7ED4B9403C7740748C190CE /* Frameworks */ = { isa = PBXGroup; children = ( - 826890D8F9778E8DFE54EF2F /* Pods_Runner.framework */, + 90E2746B12027798B0662130 /* Pods_Runner.framework */, ); name = Frameworks; sourceTree = ""; }; + F61B79B65E4ED1DCA6E50A2C /* Pods */ = { + isa = PBXGroup; + children = ( + D936D17513099C123DDF7A65 /* Pods-Runner.debug.xcconfig */, + 4A63F70A590EEC2C31E49E53 /* Pods-Runner.release.xcconfig */, + 91B24820E83830628E56E6F1 /* Pods-Runner.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -134,14 +132,14 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - E925F5FA7BF40E07C6AA8B11 /* [CP] Check Pods Manifest.lock */, + F10AA196B4EF3EDBC65C1C6B /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - DA9B41093FCB0685EC1D3CE7 /* [CP] Embed Pods Frameworks */, + 24E4F4EB271A687C8E367BA0 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -158,7 +156,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1020; + LastUpgradeCheck = 1300; ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -192,7 +190,6 @@ files = ( 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 2329B0CD267C88F100F17251 /* GoogleService-Info.plist in Resources */, 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, ); @@ -201,52 +198,52 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + 24E4F4EB271A687C8E367BA0 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputPaths = ( + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - name = "Thin Binary"; - outputPaths = ( + 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 = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; }; - 9740EEB61CF901F6004384FC /* Run Script */ = { + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Run Script"; + name = "Thin Binary"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; - DA9B41093FCB0685EC1D3CE7 /* [CP] Embed Pods Frameworks */ = { + 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + inputPaths = ( ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + name = "Run Script"; + outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; - E925F5FA7BF40E07C6AA8B11 /* [CP] Check Pods Manifest.lock */ = { + F10AA196B4EF3EDBC65C1C6B /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -343,7 +340,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -360,20 +357,12 @@ CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.app; + PRODUCT_BUNDLE_IDENTIFIER = com.example.flutter_starter; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -428,7 +417,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -477,7 +466,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -496,20 +485,12 @@ CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.app; + PRODUCT_BUNDLE_IDENTIFIER = com.example.flutter_starter; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -526,20 +507,12 @@ CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.app; + PRODUCT_BUNDLE_IDENTIFIER = com.example.flutter_starter; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; diff --git a/app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/examples/book-store-firebase/app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme similarity index 100% rename from examples/book-store-firebase/app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme rename to ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme diff --git a/app/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata similarity index 100% rename from app/ios/Runner.xcworkspace/contents.xcworkspacedata rename to ios/Runner.xcworkspace/contents.xcworkspacedata diff --git a/app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/examples/book-store-firebase/app/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift similarity index 100% rename from examples/book-store-firebase/app/ios/Runner/AppDelegate.swift rename to ios/Runner/AppDelegate.swift diff --git a/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png similarity index 100% rename from app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png diff --git a/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png similarity index 100% rename from app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png diff --git a/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png similarity index 100% rename from app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png diff --git a/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png similarity index 100% rename from app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png diff --git a/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png similarity index 100% rename from app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png diff --git a/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png similarity index 100% rename from app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png diff --git a/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png similarity index 100% rename from app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png diff --git a/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png similarity index 100% rename from app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png diff --git a/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png similarity index 100% rename from app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png diff --git a/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png similarity index 100% rename from app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png diff --git a/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png similarity index 100% rename from app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png diff --git a/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png similarity index 100% rename from app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png diff --git a/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png similarity index 100% rename from app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png diff --git a/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png similarity index 100% rename from app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png diff --git a/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png similarity index 100% rename from app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png diff --git a/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json similarity index 100% rename from app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json rename to ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json diff --git a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png similarity index 100% rename from examples/book-store-firebase/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png rename to ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png diff --git a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png similarity index 100% rename from examples/book-store-firebase/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png rename to ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png diff --git a/examples/book-store-firebase/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png similarity index 100% rename from examples/book-store-firebase/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png rename to ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png diff --git a/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md similarity index 100% rename from app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md rename to ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md diff --git a/examples/book-store-firebase/app/ios/Runner/Base.lproj/LaunchScreen.storyboard b/ios/Runner/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from examples/book-store-firebase/app/ios/Runner/Base.lproj/LaunchScreen.storyboard rename to ios/Runner/Base.lproj/LaunchScreen.storyboard diff --git a/app/ios/Runner/Base.lproj/Main.storyboard b/ios/Runner/Base.lproj/Main.storyboard similarity index 100% rename from app/ios/Runner/Base.lproj/Main.storyboard rename to ios/Runner/Base.lproj/Main.storyboard diff --git a/examples/github-repository-list/app/ios/Runner/Info.plist b/ios/Runner/Info.plist similarity index 86% rename from examples/github-repository-list/app/ios/Runner/Info.plist rename to ios/Runner/Info.plist index 00943528..c22f62a8 100644 --- a/examples/github-repository-list/app/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -5,7 +5,7 @@ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName - App + Flutter Starter CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -13,7 +13,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleName - app + flutter_starter CFBundlePackageType APPL CFBundleShortVersionString @@ -34,6 +34,12 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight + CFBundleLocalizations + + fr + en + es + UISupportedInterfaceOrientations~ipad UIInterfaceOrientationPortrait @@ -43,5 +49,7 @@ UIViewControllerBasedStatusBarAppearance + CADisableMinimumFrameDurationOnPhone + diff --git a/app/ios/Runner/Runner-Bridging-Header.h b/ios/Runner/Runner-Bridging-Header.h similarity index 100% rename from app/ios/Runner/Runner-Bridging-Header.h rename to ios/Runner/Runner-Bridging-Header.h diff --git a/l10n.yaml b/l10n.yaml new file mode 100644 index 00000000..90886d0a --- /dev/null +++ b/l10n.yaml @@ -0,0 +1,6 @@ +# This file is used to generate AppLocalisations from the +# .arb files inside lib/utils/assets/l10n folder + +arb-dir: lib/l10n +template-arb-file: app_en.arb +output-localisation-file: app_localizations.dart diff --git a/lib/api_sdk/dio/README.md b/lib/api_sdk/dio/README.md new file mode 100644 index 00000000..ba1b80d4 --- /dev/null +++ b/lib/api_sdk/dio/README.md @@ -0,0 +1,23 @@ +# Dio + +A powerful Http client for Dart, which supports Interceptors, Global configuration, FormData, Request Cancellation, File downloading, Timeout etc. + +## Folders + +- dio_helpers (Contains all the information about base urls, api calls and exception handling) +- models. (Contains the user model and an auto generated Json serializable file) + +### dio_helpers + +- [dio_apis.dart](api_sdk/dio/dio_helpers/dio_apis.dart) - Contains all the api tags. +- [dio_client.dart](api_sdk/dio/dio_helpers/dio_client.dart) - DioClient class is responsible for handling all the network call methods. +- [dio_interceptor.dart](api_sdk/dio/dio_helpers/dio_interceptor.dart) - DioInterceptor can intercept requests/responses/errors before they are handled by then or catchError. +- [dio_exceptions.dart](api_sdk/dio/dio_helpers/dio_exceptions.dart) - DioExceptions handles all the exceptions for different error codes. + +### models + +- [user_model.dart](api_sdk/dio/models/user_model.dart) - A data class that contains the serialized form of a user model. + +### dio_api_sdk + +Contains two classes DioApi and DioService that will eventually call the network methods. **DioApi** class will create a dio instance which will have interceptors added to it. **DioService** will eventually call the network methods present in [dio_service.dart](api_sdk/dio/dio_service.dart) diff --git a/lib/api_sdk/dio/dio_helpers/dio_apis.dart b/lib/api_sdk/dio/dio_helpers/dio_apis.dart new file mode 100644 index 00000000..46e07dd4 --- /dev/null +++ b/lib/api_sdk/dio/dio_helpers/dio_apis.dart @@ -0,0 +1,5 @@ +class DioApis { + static const String users = '/users/{id}'; + static const String register = '/register'; + static const String login = '/login'; +} diff --git a/lib/api_sdk/dio/dio_helpers/dio_client.dart b/lib/api_sdk/dio/dio_helpers/dio_client.dart new file mode 100644 index 00000000..7826e145 --- /dev/null +++ b/lib/api_sdk/dio/dio_helpers/dio_client.dart @@ -0,0 +1,21 @@ +import 'package:dio/dio.dart'; +import 'package:retrofit/retrofit.dart'; + +import '../../../config/config.dart'; +import 'dio_apis.dart'; + +part 'dio_client.g.dart'; + +@RestApi(baseUrl: baseUrl) +abstract class DioClient { + factory DioClient(Dio dio, {String baseUrl}) = _DioClient; + + @GET(DioApis.users) + Future getUsers(@Path("id") int id); + + @POST(DioApis.login) + Future loginUser(@Body() dynamic body); + + @POST(DioApis.register) + Future registerUser(@Body() dynamic body); +} diff --git a/lib/api_sdk/dio/dio_helpers/dio_client.g.dart b/lib/api_sdk/dio/dio_helpers/dio_client.g.dart new file mode 100644 index 00000000..f963aea3 --- /dev/null +++ b/lib/api_sdk/dio/dio_helpers/dio_client.g.dart @@ -0,0 +1,77 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'dio_client.dart'; + +// ************************************************************************** +// RetrofitGenerator +// ************************************************************************** + +// ignore_for_file: unnecessary_brace_in_string_interps,no_leading_underscores_for_local_identifiers + +class _DioClient implements DioClient { + _DioClient(this._dio, {this.baseUrl}) { + baseUrl ??= 'https://reqres.in/api'; + } + + final Dio _dio; + + String? baseUrl; + + @override + Future getUsers(id) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + final _result = await _dio.fetch(_setStreamType( + Options(method: 'GET', headers: _headers, extra: _extra) + .compose(_dio.options, '/users/${id}', + queryParameters: queryParameters, data: _data) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data; + return value; + } + + @override + Future loginUser(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = body; + final _result = await _dio.fetch(_setStreamType( + Options(method: 'POST', headers: _headers, extra: _extra) + .compose(_dio.options, '/login', + queryParameters: queryParameters, data: _data) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data; + return value; + } + + @override + Future registerUser(body) async { + const _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = body; + final _result = await _dio.fetch(_setStreamType( + Options(method: 'POST', headers: _headers, extra: _extra) + .compose(_dio.options, '/register', + queryParameters: queryParameters, data: _data) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = _result.data; + return value; + } + + RequestOptions _setStreamType(RequestOptions requestOptions) { + if (T != dynamic && + !(requestOptions.responseType == ResponseType.bytes || + requestOptions.responseType == ResponseType.stream)) { + if (T == String) { + requestOptions.responseType = ResponseType.plain; + } else { + requestOptions.responseType = ResponseType.json; + } + } + return requestOptions; + } +} diff --git a/lib/api_sdk/dio/dio_helpers/dio_exceptions.dart b/lib/api_sdk/dio/dio_helpers/dio_exceptions.dart new file mode 100644 index 00000000..f5777f5f --- /dev/null +++ b/lib/api_sdk/dio/dio_helpers/dio_exceptions.dart @@ -0,0 +1,43 @@ +import 'package:dio/dio.dart'; + +class DioExceptions implements Exception { + final String message; + final RequestOptions requestOptions; + + DioExceptions({required this.message, required this.requestOptions}); +} + +class TimeOutException extends DioExceptions { + TimeOutException(String message, RequestOptions requestOptions) + : super(message: message, requestOptions: requestOptions); +} + +class BadRequestException extends DioExceptions { + BadRequestException(String message, RequestOptions requestOptions) + : super(message: message, requestOptions: requestOptions); +} + +class UnauthorisedException extends DioExceptions { + UnauthorisedException(String message, RequestOptions requestOptions) + : super(message: message, requestOptions: requestOptions); +} + +class FileNotFoundException extends DioExceptions { + FileNotFoundException(String message, RequestOptions requestOptions) + : super(message: message, requestOptions: requestOptions); +} + +class InternalServerException extends DioExceptions { + InternalServerException(String message, RequestOptions requestOptions) + : super(message: message, requestOptions: requestOptions); +} + +class BadGateWayException extends DioExceptions { + BadGateWayException(String message, RequestOptions requestOptions) + : super(message: message, requestOptions: requestOptions); +} + +class ConnectionException extends DioExceptions { + ConnectionException(String message, RequestOptions requestOptions) + : super(message: message, requestOptions: requestOptions); +} diff --git a/lib/api_sdk/dio/dio_helpers/dio_interceptor.dart b/lib/api_sdk/dio/dio_helpers/dio_interceptor.dart new file mode 100644 index 00000000..d4a70d56 --- /dev/null +++ b/lib/api_sdk/dio/dio_helpers/dio_interceptor.dart @@ -0,0 +1,79 @@ +import 'package:dio/dio.dart'; + +import 'dio_exceptions.dart'; + +class DioInterceptor extends Interceptor { + @override + void onRequest(RequestOptions options, RequestInterceptorHandler handler) { + // Do something before request is sent. + super.onRequest(options, handler); + } + + @override + void onResponse(Response response, ResponseInterceptorHandler handler) { + // Do something with the response data. + super.onResponse(response, handler); + } + + @override + void onError(DioError err, ErrorInterceptorHandler handler) { + // Do something with the response error. + _handleError(err); + super.onError(err, handler); + } + + _handleError(DioError err) { + switch (err.type) { + case DioErrorType.connectTimeout: + case DioErrorType.receiveTimeout: + case DioErrorType.sendTimeout: + throw TimeOutException(err.message, err.requestOptions); + case DioErrorType.response: + switch (err.response?.statusCode) { + case 400: + throw BadRequestException( + err.error.toString(), + err.requestOptions, + ); + case 401: + throw UnauthorisedException( + err.error.toString(), + err.requestOptions, + ); + case 403: + throw UnauthorisedException( + err.error.toString(), + err.requestOptions, + ); + case 404: + throw FileNotFoundException( + err.error.toString(), + err.requestOptions, + ); + case 500: + throw InternalServerException( + err.error.toString(), + err.requestOptions, + ); + case 502: + throw BadGateWayException( + err.error.toString(), + err.requestOptions, + ); + case 503: + throw BadGateWayException( + err.error.toString(), + err.requestOptions, + ); + } + break; + case DioErrorType.other: + throw ConnectionException( + 'Please check your network connection', + err.requestOptions, + ); + default: + throw err; + } + } +} diff --git a/lib/api_sdk/dio/dio_service.dart b/lib/api_sdk/dio/dio_service.dart new file mode 100644 index 00000000..84c80a28 --- /dev/null +++ b/lib/api_sdk/dio/dio_service.dart @@ -0,0 +1,45 @@ +import 'package:dio/dio.dart'; + +import 'dio_helpers/dio_client.dart'; +import 'dio_helpers/dio_interceptor.dart'; + +class DioApi { + DioApi._internal(); + + static final _singleton = DioApi._internal(); + + factory DioApi() => _singleton; + + static Dio createDio() { + var dio = Dio(BaseOptions( + receiveTimeout: 15000, + connectTimeout: 15000, + sendTimeout: 15000, + )); + + dio.interceptors.addAll({ + DioInterceptor(), + }); + return dio; + } +} + +class DioService { + static getUserData(int id) async { + final client = DioClient(DioApi.createDio()); + final response = await client.getUsers(id); + return response; + } + + static loginUser(dynamic body) async { + final client = DioClient(DioApi.createDio()); + final response = await client.loginUser(body); + return response; + } + + static registerUser(dynamic body) async { + final client = DioClient(DioApi.createDio()); + final response = await client.loginUser(body); + return response; + } +} diff --git a/lib/api_sdk/dio/models/user_model.dart b/lib/api_sdk/dio/models/user_model.dart new file mode 100644 index 00000000..b4b48031 --- /dev/null +++ b/lib/api_sdk/dio/models/user_model.dart @@ -0,0 +1,41 @@ +import 'package:json_annotation/json_annotation.dart'; + +part 'user_model.g.dart'; + +@JsonSerializable() +class DioResponseData { + Data? data; + Support? support; + + DioResponseData({this.data, this.support}); + + factory DioResponseData.fromJson(Map json) => + _$DioResponseDataFromJson(json); + Map toJson() => _$DioResponseDataToJson(this); +} + +@JsonSerializable() +class Data { + int? id; + String? email; + String? firstName; + String? lastName; + String? avatar; + + Data({this.id, this.email, this.firstName, this.lastName, this.avatar}); + + factory Data.fromJson(Map json) => _$DataFromJson(json); + Map toJson() => _$DataToJson(this); +} + +@JsonSerializable() +class Support { + String? url; + String? text; + + Support({this.url, this.text}); + + factory Support.fromJson(Map json) => + _$SupportFromJson(json); + Map toJson() => _$SupportToJson(this); +} diff --git a/lib/api_sdk/dio/models/user_model.g.dart b/lib/api_sdk/dio/models/user_model.g.dart new file mode 100644 index 00000000..5ed5c03e --- /dev/null +++ b/lib/api_sdk/dio/models/user_model.g.dart @@ -0,0 +1,49 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'user_model.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +DioResponseData _$DioResponseDataFromJson(Map json) => + DioResponseData( + data: json['data'] == null + ? null + : Data.fromJson(json['data'] as Map), + support: json['support'] == null + ? null + : Support.fromJson(json['support'] as Map), + ); + +Map _$DioResponseDataToJson(DioResponseData instance) => + { + 'data': instance.data, + 'support': instance.support, + }; + +Data _$DataFromJson(Map json) => Data( + id: json['id'] as int?, + email: json['email'] as String?, + firstName: json['firstName'] as String?, + lastName: json['lastName'] as String?, + avatar: json['avatar'] as String?, + ); + +Map _$DataToJson(Data instance) => { + 'id': instance.id, + 'email': instance.email, + 'firstName': instance.firstName, + 'lastName': instance.lastName, + 'avatar': instance.avatar, + }; + +Support _$SupportFromJson(Map json) => Support( + url: json['url'] as String?, + text: json['text'] as String?, + ); + +Map _$SupportToJson(Support instance) => { + 'url': instance.url, + 'text': instance.text, + }; diff --git a/lib/api_sdk/dio_api_sdk.dart b/lib/api_sdk/dio_api_sdk.dart new file mode 100644 index 00000000..0c11611f --- /dev/null +++ b/lib/api_sdk/dio_api_sdk.dart @@ -0,0 +1,18 @@ +import 'dio/dio_service.dart'; + +class ApiSdk { + static loginWithEmailAndPassword(dynamic body) async { + final response = await DioService.loginUser(body); + return response; + } + + static signUpWithEmailAndPassword(dynamic body) async { + final response = await DioService.registerUser(body); + return response; + } + + static getUserData(int id) async { + final response = await DioService.getUserData(id); + return response; + } +} diff --git a/lib/api_sdk/graphql/README.md b/lib/api_sdk/graphql/README.md new file mode 100644 index 00000000..26ec41be --- /dev/null +++ b/lib/api_sdk/graphql/README.md @@ -0,0 +1,93 @@ +# GraphQL + +A stand-alone GraphQL client for Flutter, bringing all the features from a modern GraphQL client to one easy-to-use package. + +## Folders + +- [graphql_helpers](./graphql_helpers/) - Contains all the information about the client, queries, and variables. + +### graphql_helpers + +- [graphql_config.dart](./graphql_helpers/graphql_config.dart) - Contains the base URL and access token. +- [graphql_query.dart](./graphql_helpers/graphql_query.dart) - Contains all the graphql queries. + +### graphql_api_sdk + +- [graphql_service.dart](./graphql_service.dart) contains two classes GraphqlApi and GraphqlService + - **GraphqlApi** class will create a graphql client. + - **GraphqlService** will call the network methods. + +## Instructions + +In order to use the GraphQL API service users have to host their own graphql server. +We recommend using either **Apollo Server** or **Hasura Cloud**. + +### 1. Apollo Server + +- Step 1: Create a new project + ```sh + mkdir graphql-server + cd graphql-server + ``` +- Step 2: Install dependencies + ```sh + npm init --yes + npm install @apollo/server graphql + ``` +- Step 3: Define your GraphQL schema + ```js + type Query { + login(email: String!, password: String!): Login + } + type Login { + token: String + } + ``` +- Step 4: Define your data set + ```js + const login = { + token: "", + }; + ``` +- Step 5: Define a resolver + ```js + const resolvers = { + Query: { + login: () => login, + }, + }; + ``` +- Step 6: Create an instance of ApolloServer + ```js + const server = new ApolloServer({ + typeDefs, + resolvers, + }); + ``` +- Step 7: Prepare the server + ```js + const { url } = await startStandaloneServer(server, { + listen: { port: 4000 }, + }); + ``` +- Step 8: Start the server + ```sh + npm start + ``` + After that, your server will be ready at 🚀 http://localhost:4000/ +- Step 9: Deploy the server on Heroku (Optional) +- Step 10: Replace the local/hosted URL in the [graphql_service.dart](./graphql_service.dart) file. + +### 2. Hasura Cloud + +- Step 1: Create an account + - Navigate to https://cloud.hasura.io, and create a new Hasura Cloud account. +- Step 2: Create a project + - Select your hosting provider and create a free project. +- Step 3: Connect new/existing database + - On the Hasura console, navigate to Data -> Manage -> Connect Database. + - Hasura also provides a new Postgres database i.e. Neon Database. +- Step 4: Try out Hasura + - Create the table and insert rows. +- Step 5: Launch the Console + - Open the Hasura console and grab your base URL and access token then update credentials in the [graphql_service.dart](./graphql_service.dart) file. diff --git a/lib/api_sdk/graphql/graphql_helpers/graphql_config.dart b/lib/api_sdk/graphql/graphql_helpers/graphql_config.dart new file mode 100644 index 00000000..ce2e0472 --- /dev/null +++ b/lib/api_sdk/graphql/graphql_helpers/graphql_config.dart @@ -0,0 +1,2 @@ +const String baseUrl = ''; +const String accessToken = ''; diff --git a/lib/api_sdk/graphql/graphql_helpers/graphql_query.dart b/lib/api_sdk/graphql/graphql_helpers/graphql_query.dart new file mode 100644 index 00000000..aca98286 --- /dev/null +++ b/lib/api_sdk/graphql/graphql_helpers/graphql_query.dart @@ -0,0 +1,36 @@ +class GraphqlQuery { + static const String login = r''' +query Login($email: String!, $password: String!) { + login(email: $email, password: $password) { + token + } +} +'''; + + static const String register = r''' +query Register($email: String!, $password: String!) { + register(email: $email, password: $password) { + token + id + } +} +'''; + + static const String users = r''' +query User($id: Int!) { + user(id: $id) { + data { + id + email + first_name + last_name + avatar + } + support { + url + text + } + } +} +'''; +} diff --git a/lib/api_sdk/graphql/graphql_service.dart b/lib/api_sdk/graphql/graphql_service.dart new file mode 100644 index 00000000..8286ce9c --- /dev/null +++ b/lib/api_sdk/graphql/graphql_service.dart @@ -0,0 +1,44 @@ +import 'package:graphql_flutter/graphql_flutter.dart'; + +import 'graphql_helpers/graphql_config.dart'; + +class GraphqlApi { + GraphqlApi._internal(); + + static final _singleton = GraphqlApi._internal(); + + factory GraphqlApi() => _singleton; + + static GraphQLClient createClient() { + final HttpLink httpLink = HttpLink(baseUrl); + + final AuthLink authLink = AuthLink(getToken: () => 'Bearer $accessToken'); + + final Link link = authLink.concat(httpLink); + + final GraphQLClient graphQLClient = GraphQLClient( + link: link, + cache: GraphQLCache(), + ); + + return graphQLClient; + } +} + +class GraphqlService { + static getQuery( + String document, [ + Map variables = const {}, + ]) async { + final graphQLClient = GraphqlApi.createClient(); + + final response = await graphQLClient.query( + QueryOptions( + document: gql(document), + variables: variables, + ), + ); + + return response; + } +} diff --git a/lib/api_sdk/graphql_api_sdk.dart b/lib/api_sdk/graphql_api_sdk.dart new file mode 100644 index 00000000..1ae4ddca --- /dev/null +++ b/lib/api_sdk/graphql_api_sdk.dart @@ -0,0 +1,22 @@ +import 'graphql/graphql_helpers/graphql_query.dart'; +import 'graphql/graphql_service.dart'; + +class ApiSdk { + static loginWithEmailAndPassword(dynamic variables) async { + final response = + await GraphqlService.getQuery(GraphqlQuery.login, variables); + return response.data['login']; + } + + static signUpWithEmailAndPassword(dynamic variables) async { + final response = + await GraphqlService.getQuery(GraphqlQuery.register, variables); + return response.data['register']; + } + + static getUserData(int id) async { + final response = + await GraphqlService.getQuery(GraphqlQuery.users, {"id": id}); + return response.data['user']; + } +} diff --git a/lib/api_sdk/http/README.md b/lib/api_sdk/http/README.md new file mode 100644 index 00000000..18ceee22 --- /dev/null +++ b/lib/api_sdk/http/README.md @@ -0,0 +1,17 @@ +# Http + +A composable, Future-based library for making HTTP requests that contains a set of high-level functions and classes that make it easy to consume HTTP resources. + +## Folders + +- http_helpers (Contains all the information about base urls, api calls and exception handling) + +### http_helpers + +- [http_client.dart](api_sdk/http/http_helpers/http_client.dart) - HttpClient class is responsible for handling all the network call methods. +- [http_exception.dart](api_sdk/http/http_helpers/http_exception.dart) - HttpExceptions handles all the exceptions for different error codes. +- [http_interceptor.dart](api_sdk/http/http_helpers/http_interceptor.dart) - HttpInterceptor lets you intercept the different requests and responses. + +### http_api_sdk + +Contains two classes HttpApi and HttpService that will eventually call the network methods. **HttpApi** class will create a client instance which will have interceptors added to it. **HttpService** will eventually call the network methods present in [http_service.dart](api_sdk/http/http_service.dart) diff --git a/lib/api_sdk/http/http_helpers/http_apis.dart b/lib/api_sdk/http/http_helpers/http_apis.dart new file mode 100644 index 00000000..6342cce3 --- /dev/null +++ b/lib/api_sdk/http/http_helpers/http_apis.dart @@ -0,0 +1,5 @@ +class HttpApis { + static String users(int id) => '/users/$id'; + static const String register = '/register'; + static const String login = '/login'; +} diff --git a/lib/api_sdk/http/http_helpers/http_client.dart b/lib/api_sdk/http/http_helpers/http_client.dart new file mode 100644 index 00000000..ef5292bd --- /dev/null +++ b/lib/api_sdk/http/http_helpers/http_client.dart @@ -0,0 +1,99 @@ +import 'dart:convert'; +import 'dart:io'; + +import 'package:http/http.dart' as http; + +import '../../../config/config.dart'; +import 'http_exception.dart'; + +class HttpClient { + final http.Client client; + HttpClient({required this.client}); + Future get( + String url, { + Map? headers, + bool isTokenRequired = false, + }) async { + http.Response? response; + dynamic responseJson; + + try { + response = + await http.get(Uri.parse(baseUrl + url), headers: headers ?? {}); + + responseJson = _returnResponse(response); + } on SocketException { + throw FetchDataException('No Internet connection'); + } + return responseJson; + } + + Future post(String url, + {Map? headers, Object? body}) async { + http.Response? response; + dynamic responseJson; + try { + response = await http.post(Uri.parse(baseUrl + url), + headers: headers ?? {}, body: body); + responseJson = _returnResponse(response); + } on SocketException { + throw FetchDataException('No Internet connection'); + } + + return responseJson; + } + + Future put(String url, + {Map? headers, Object? body}) async { + http.Response? response; + dynamic responseJson; + try { + response = await http.put(Uri.parse(baseUrl + url), + headers: headers ?? {}, body: body); + responseJson = _returnResponse(response); + } on SocketException { + throw FetchDataException('No Internet connection'); + } + + return responseJson; + } + + Future delete(String url, {Map? headers}) async { + http.Response? response; + dynamic responseJson; + try { + response = + await http.delete(Uri.parse(baseUrl + url), headers: headers ?? {}); + responseJson = _returnResponse(response); + } on SocketException { + throw FetchDataException('No Internet connection'); + } + + return responseJson; + } +} + +dynamic _returnResponse(http.Response response) { + switch (response.statusCode) { + case 200: + var responseJson = json.decode(response.body.toString()); + return responseJson; + case 400: + throw BadRequestException(response.body.toString()); + case 401: + throw UnauthorisedException(response.body.toString()); + case 403: + throw UnauthorisedException(response.body.toString()); + case 404: + throw FileNotFoundException(response.body.toString()); + case 500: + throw InternalServerException(response.body.toString()); + case 502: + throw BadGateWayException(response.body.toString()); + case 503: + throw BadGateWayException(response.body.toString()); + default: + return FetchDataException( + 'Error occured while Communication with Server with StatusCode : ${response.statusCode}'); + } +} diff --git a/lib/api_sdk/http/http_helpers/http_exception.dart b/lib/api_sdk/http/http_helpers/http_exception.dart new file mode 100644 index 00000000..59c86950 --- /dev/null +++ b/lib/api_sdk/http/http_helpers/http_exception.dart @@ -0,0 +1,42 @@ +class HttpException implements Exception { + final dynamic _message; + final dynamic _prefix; + + HttpException([this._message, this._prefix]); + + @override + String toString() { + return "$_prefix$_message"; + } +} + +class FetchDataException extends HttpException { + FetchDataException([String? message]) + : super(message, "Error During Communication: "); +} + +class BadRequestException extends HttpException { + BadRequestException([message]) : super(message, "Invalid Request: "); +} + +class UnauthorisedException extends HttpException { + UnauthorisedException([message]) : super(message, "Unauthorised: "); +} + +class InvalidInputException extends HttpException { + InvalidInputException([String? message]) : super(message, "Invalid Input: "); +} + +class FileNotFoundException extends HttpException { + FileNotFoundException([String? message]) : super(message, "File not found: "); +} + +class InternalServerException extends HttpException { + InternalServerException([String? message]) + : super(message, "Internal Server Exception: "); +} + +class BadGateWayException extends HttpException { + BadGateWayException([String? message]) + : super(message, "Bad Gateway Exception: "); +} diff --git a/lib/api_sdk/http/http_helpers/http_interceptor.dart b/lib/api_sdk/http/http_helpers/http_interceptor.dart new file mode 100644 index 00000000..0850005c --- /dev/null +++ b/lib/api_sdk/http/http_helpers/http_interceptor.dart @@ -0,0 +1,15 @@ +import 'package:http_interceptor/http_interceptor.dart'; + +class HttpInterceptor extends InterceptorContract { + @override + Future interceptRequest({required RequestData data}) { + // triggers before the http request is called + throw UnimplementedError(); + } + + @override + Future interceptResponse({required ResponseData data}) { + // triggers after the request is called + throw UnimplementedError(); + } +} diff --git a/lib/api_sdk/http/http_service.dart b/lib/api_sdk/http/http_service.dart new file mode 100644 index 00000000..b509392d --- /dev/null +++ b/lib/api_sdk/http/http_service.dart @@ -0,0 +1,41 @@ +import 'package:http/http.dart'; +import 'package:http_interceptor/http/intercepted_client.dart'; + +import 'http_helpers/http_client.dart'; +import 'http_helpers/http_interceptor.dart'; + +class HttpApi { + HttpApi._internal(); + + static final _singleton = HttpApi._internal(); + + factory HttpApi() => _singleton; + + static Client createHttp() { + Client httpClient = InterceptedClient.build(interceptors: [ + HttpInterceptor(), + ]); + return httpClient; + } +} + +class HttpService { + static getData(String url) async { + final client = HttpClient(client: HttpApi.createHttp()); + final response = await client.get(url); + return response; + } + + static postData(String url, dynamic body) async { + final client = HttpClient(client: HttpApi.createHttp()); + final response = await client.post(url, body: body); + + return response; + } + + static putData(String url, dynamic body) async { + final client = HttpClient(client: HttpApi.createHttp()); + final response = await client.put(url, body: body); + return response; + } +} diff --git a/lib/api_sdk/http_api_sdk.dart b/lib/api_sdk/http_api_sdk.dart new file mode 100644 index 00000000..2de30654 --- /dev/null +++ b/lib/api_sdk/http_api_sdk.dart @@ -0,0 +1,19 @@ +import 'http/http_helpers/http_apis.dart'; +import 'http/http_service.dart'; + +class ApiSdk { + static loginWithEmailAndPassword(dynamic body) async { + final response = await HttpService.postData(HttpApis.login, body); + return response; + } + + static signUpWithEmailAndPassword(dynamic body) async { + final response = await HttpService.postData(HttpApis.register, body); + return response; + } + + static getUserData(int id) async { + final response = await HttpService.getData(HttpApis.users(id)); + return response; + } +} diff --git a/lib/app.dart b/lib/app.dart new file mode 100644 index 00000000..5d130458 --- /dev/null +++ b/lib/app.dart @@ -0,0 +1,45 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_gen/gen_l10n/app_localizations.dart'; +import 'package:flutter_localizations/flutter_localizations.dart'; + +import 'common_export.dart'; + +class App extends StatelessWidget { + const App({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return BlocBuilder( + builder: (context, state) { + /// Without go_router we should return MaterialApp() with + /// {onGenerateRoute: routes} + /// routes from routes.dart + return MaterialApp.router( + debugShowCheckedModeBanner: false, + title: 'Hello World!', + theme: ThemeConfig.lightTheme, + darkTheme: ThemeConfig.darkTheme, + themeMode: state is SetTheme + ? state.appTheme == AppTheme.light + ? ThemeMode.light + : ThemeMode.dark + : ThemeMode.light, + // onGenerateRoute: routes, + routeInformationParser: router.routeInformationParser, + routerDelegate: router.routerDelegate, + routeInformationProvider: router.routeInformationProvider, + + localizationsDelegates: const [ + AppLocalizations.delegate, + GlobalMaterialLocalizations.delegate, + GlobalCupertinoLocalizations.delegate, + GlobalWidgetsLocalizations.delegate, + ], + supportedLocales: AppLocalizations.supportedLocales, + // locale: const Locale('fr'), + ); + }, + ); + } +} diff --git a/lib/common_export.dart b/lib/common_export.dart new file mode 100644 index 00000000..d01de0ad --- /dev/null +++ b/lib/common_export.dart @@ -0,0 +1,27 @@ +export 'api_sdk/dio_api_sdk.dart'; +export 'app.dart'; +export 'routes/routes.dart'; +export 'screens/home/home.dart'; +export 'screens/login/login_screen.dart'; +export 'screens/login/widgets/login_form.dart'; +export 'screens/signup/signup_screen.dart'; +export 'screens/signup/widgets/signup_form.dart'; +export 'screens/splash/splash_screen.dart'; +export 'shared/bloc/authentication/authentication_bloc.dart'; +export 'shared/bloc/bloc_controller.dart'; +export 'shared/bloc/update_theme/update_theme_bloc.dart'; +export 'shared/models/current_user_data.dart'; +export 'shared/models/current_user_data.dart'; +export 'shared/models/firebase_user.dart'; +export 'shared/models/firebase_user.dart'; +export 'shared/models/token.dart'; +export 'shared/models/user.dart'; +export 'shared/models/user_data.dart'; +export 'shared/repository/authentication_repository.dart'; +export 'shared/shared.dart'; +export 'themes/color_constants.dart'; +export 'themes/theme_data.dart'; +export 'utils/image_constants.dart'; +export 'utils/responsive.dart'; +export 'utils/size_utils.dart'; +export 'widgets/cache_image_widget.dart'; diff --git a/lib/config/config.dart b/lib/config/config.dart new file mode 100644 index 00000000..19ce7b6b --- /dev/null +++ b/lib/config/config.dart @@ -0,0 +1 @@ +const String baseUrl = "https://reqres.in/api"; // User authetication diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb new file mode 100644 index 00000000..d99a38fe --- /dev/null +++ b/lib/l10n/app_en.arb @@ -0,0 +1,4 @@ +{ + "homeText" : "Home", + "flutterStarterText" : "Flutter Starter" +} \ No newline at end of file diff --git a/lib/l10n/app_es.arb b/lib/l10n/app_es.arb new file mode 100644 index 00000000..fe37fac6 --- /dev/null +++ b/lib/l10n/app_es.arb @@ -0,0 +1,4 @@ +{ + "homeText" : "SHome", + "flutterStarterText" : "SFlutter Starter" +} \ No newline at end of file diff --git a/lib/l10n/app_fr.arb b/lib/l10n/app_fr.arb new file mode 100644 index 00000000..5c8d8d62 --- /dev/null +++ b/lib/l10n/app_fr.arb @@ -0,0 +1,4 @@ +{ + "homeText" : "FHome", + "flutterStarterText" : "FFlutter Starter" +} \ No newline at end of file diff --git a/lib/main.dart b/lib/main.dart new file mode 100644 index 00000000..1c226f5e --- /dev/null +++ b/lib/main.dart @@ -0,0 +1,26 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; + +import 'common_export.dart'; + +Future main() async { + WidgetsFlutterBinding.ensureInitialized(); + await SharedPrefs.instance.init(); + final authenticationService = AuthenticationRepository(); + + runApp( + MultiBlocProvider( + providers: [ + BlocProvider( + create: (BuildContext context) => AuthenticationBloc( + authenticationService: authenticationService, + ), + ), + BlocProvider( + create: (BuildContext context) => UpdateThemeBloc(), + ), + ], + child: const App(), + ), + ); +} diff --git a/lib/routes/routes.dart b/lib/routes/routes.dart new file mode 100644 index 00000000..c88e1d14 --- /dev/null +++ b/lib/routes/routes.dart @@ -0,0 +1,52 @@ +import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; + +import '../common_export.dart'; + +final GoRouter router = GoRouter( + initialLocation: '/', + routes: [ + GoRoute( + path: '/', + builder: (BuildContext context, GoRouterState state) { + return const SplashScreen(); + }, + ), + GoRoute( + path: '/home', + builder: (BuildContext context, GoRouterState state) { + return const HomeScreen(); + }, + ), + GoRoute( + path: '/login', + builder: (BuildContext context, GoRouterState state) { + return const LoginScreen(); + }, + ), + GoRoute( + path: '/signup', + builder: (BuildContext context, GoRouterState state) { + return const SignUpScreen(); + }, + ), + ], +); + +/// routes for the app Without go_router +// import 'package:flutter_starter/flutter_starter.dart'; + +// import 'package:flutter/material.dart'; + +// Route routes(RouteSettings settings) { +// switch (settings.name) { +// case '/': +// return MaterialPageRoute(builder: (_) => const SplashScreen()); +// case '/home': +// return MaterialPageRoute(builder: (_) => const HomeScreen()); +// case '/auth': +// return MaterialPageRoute(builder: (_) => const AuthenticationScreen()); +// default: +// return MaterialPageRoute(builder: (_) => const SplashScreen()); +// } +// } diff --git a/lib/screens/home/home.dart b/lib/screens/home/home.dart new file mode 100644 index 00000000..b450a4a1 --- /dev/null +++ b/lib/screens/home/home.dart @@ -0,0 +1,180 @@ +// home screen contents +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_gen/gen_l10n/app_localizations.dart'; +import 'package:go_router/go_router.dart'; + +import '../../common_export.dart'; + +class HomeScreen extends StatefulWidget { + const HomeScreen({Key? key}) : super(key: key); + + @override + State createState() => _HomeScreenState(); +} + +class _HomeScreenState extends State { + late final AuthenticationBloc authenticationBloc; + bool switchValue = false; + + @override + void initState() { + super.initState(); + authenticationBloc = BlocProvider.of(context); + authenticationBloc.add(const GetUserData()); + switchValue = BlocProvider.of(context).state.props.first == + AppTheme.light + ? false + : true; + } + + @override + Widget build(BuildContext context) { + return WillPopScope( + onWillPop: () async => false, + child: BlocListener( + bloc: authenticationBloc, + listener: (context, state) { + if (state is UserLogoutState) { + context.go('/login'); + } + }, + child: BlocBuilder( + bloc: authenticationBloc, + builder: (BuildContext context, AuthenticationState state) { + if (state is SetUserData) { + return Scaffold( + appBar: AppBar( + backgroundColor: Theme.of(context).primaryColor, + centerTitle: true, + title: Text( + AppLocalizations.of(context)?.flutterStarterText ?? + 'Flutter Starter', + style: Theme.of(context) + .textTheme + .headline3! + .copyWith(color: Theme.of(context).backgroundColor), + ), + actions: [ + IconButton( + key: const Key('logoutButton'), + icon: const Icon(Icons.logout), + onPressed: () { + authenticationBloc.add(const UserLogOut()); + }), + ], + ), + backgroundColor: Theme.of(context).backgroundColor, + body: Center( + child: Text( + AppLocalizations.of(context)?.homeText ?? 'Home', + style: Theme.of(context).textTheme.headline6), + ), + drawer: Drawer( + backgroundColor: Theme.of(context).backgroundColor, + child: ListView( + padding: EdgeInsets.zero, + children: [ + DrawerHeader( + decoration: BoxDecoration( + color: Theme.of(context).primaryColor, + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + CachedNetworkImage( + imageUrl: + state.currentUserData.data!.avatar, + imageBuilder: (context, imageProvider) => + Container( + width: 65.toResponsiveWidth, + height: 65.toResponsiveHeight, + decoration: BoxDecoration( + shape: BoxShape.circle, + image: DecorationImage( + image: imageProvider, + fit: BoxFit.cover), + ), + ), + placeholder: (context, url) => + const CircularProgressIndicator(), + errorWidget: (context, url, error) => + Image.network( + AllImages().kDefaultImage, + ), + ), + Switch( + key: const Key('themeSwitch'), + activeColor: + Theme.of(context).backgroundColor, + value: switchValue, + onChanged: (value) { + setState(() { + switchValue = value; + }); + + BlocProvider.of(context) + .add(UpdateTheme( + appTheme: value + ? AppTheme.dark + : AppTheme.light)); + }, + ) + ], + ) + ], + ), + ), + ListTile( + dense: true, + leading: Text("Name", + style: Theme.of(context).textTheme.headline6), + title: Text( + '${state.currentUserData.data!.firstName} ${state.currentUserData.data!.lastName}', + style: Theme.of(context) + .textTheme + .bodyText2! + .copyWith(fontSize: 12.toResponsiveFont)), + ), + ListTile( + dense: true, + leading: Text("Email", + style: Theme.of(context).textTheme.headline6), + title: Text(state.currentUserData.data!.email, + style: Theme.of(context) + .textTheme + .bodyText2! + .copyWith(fontSize: 12.toResponsiveFont)), + ), + ListTile( + leading: Text("Text", + style: Theme.of(context).textTheme.headline6), + title: Text(state.currentUserData.support!.text, + style: Theme.of(context) + .textTheme + .bodyText2! + .copyWith(fontSize: 12.toResponsiveFont)), + ), + ], + ), + ), + ); + } + return Scaffold( + body: Center( + child: CircularProgressIndicator( + color: Theme.of(context).primaryColor, + ), + ), + ); + }), + ), + ); + } +} diff --git a/lib/screens/login/login_screen.dart b/lib/screens/login/login_screen.dart new file mode 100644 index 00000000..a3c8d6ef --- /dev/null +++ b/lib/screens/login/login_screen.dart @@ -0,0 +1,125 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:fluttertoast/fluttertoast.dart'; +import 'package:go_router/go_router.dart'; + +import '../../common_export.dart'; + +class LoginScreen extends StatefulWidget { + const LoginScreen({Key? key}) : super(key: key); + + @override + State createState() => _LoginScreenState(); +} + +class _LoginScreenState extends State { + late final AuthenticationBloc authenticationBloc; + + @override + void initState() { + super.initState(); + authenticationBloc = BlocProvider.of(context); + } + + void _showError(String error) async { + await Fluttertoast.showToast( + msg: error, + toastLength: Toast.LENGTH_SHORT, + gravity: ToastGravity.BOTTOM, + timeInSecForIosWeb: 3, + backgroundColor: Theme.of(context).errorColor, + textColor: Colors.white, + fontSize: 16.0); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + body: WillPopScope( + onWillPop: () async => false, + child: BlocListener( + bloc: authenticationBloc, + listener: (context, state) { + if (state is AuthenticationFailure) { + _showError(state.message); + } + if (state is AppAutheticated) { + context.go('/home'); + } + }, + child: BlocBuilder( + bloc: authenticationBloc, + builder: (BuildContext context, AuthenticationState state) { + return SafeArea( + child: Responsive.isDesktop(context) + ? Center( + child: Card( + elevation: 15, + child: SizedBox( + width: 500.toResponsiveWidth, + height: 650.toResponsiveHeight, + child: _authenticationForm(context, state)), + ), + ) + : SingleChildScrollView( + child: _authenticationForm(context, state), + ), + ); + }), + ), + ), + ); + } + + Widget _authenticationForm(BuildContext context, AuthenticationState state) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Center( + child: Image.asset( + AllImages().login, + width: 350.toResponsiveWidth, + height: 300.toResponsiveHeight, + )), + SizedBox(height: 12.toResponsiveHeight), + Container( + margin: EdgeInsets.symmetric(horizontal: 32.toResponsiveWidth), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text('Login', style: Theme.of(context).textTheme.headline1), + SizedBox(height: 15.toResponsiveHeight), + LoginForm( + authenticationBloc: authenticationBloc, + state: state, + ), + ], + ), + ), + SizedBox(height: 32.toResponsiveHeight), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + 'New here?', + style: Theme.of(context) + .textTheme + .bodyText2! + .copyWith(fontSize: 12.toResponsiveFont), + ), + InkWell( + child: Text( + ' Sign Up', + style: Theme.of(context).textTheme.bodyText2!.copyWith( + fontSize: 13.toResponsiveFont, + color: Theme.of(context).primaryColor), + ), + onTap: () { + context.push('/signup'); + }), + ], + ) + ], + ); + } +} diff --git a/lib/screens/login/widgets/login_form.dart b/lib/screens/login/widgets/login_form.dart new file mode 100644 index 00000000..bc0d9783 --- /dev/null +++ b/lib/screens/login/widgets/login_form.dart @@ -0,0 +1,107 @@ +import 'package:flutter/material.dart'; + +import '../../../common_export.dart'; + +class LoginForm extends StatefulWidget { + final AuthenticationBloc authenticationBloc; + final AuthenticationState state; + const LoginForm( + {Key? key, required this.authenticationBloc, required this.state}) + : super(key: key); + @override + State createState() => _LoginFormState(); +} + +class _LoginFormState extends State { + final GlobalKey _key = GlobalKey(); + final _passwordController = TextEditingController(); + final _emailController = TextEditingController(); + // @override + // void initState() { + // // TODO: implement initState + // super.initState(); + + // _emailController.text = "eve.holt@reqres.in"; + // _passwordController.text = "pistol"; + // } + + @override + Widget build(BuildContext context) { + return Form( + key: _key, + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + TextFormField( + // initialValue: "eve.holt@reqres.in", + key: const Key('emailField'), + cursorColor: Theme.of(context).textTheme.headline1!.color, + decoration: InputDecoration( + labelText: 'Email address', + isDense: true, + prefixIcon: Icon( + Icons.email, + size: 28.toResponsiveFont, + ), + ), + controller: _emailController, + keyboardType: TextInputType.emailAddress, + autocorrect: false, + validator: (value) { + if (value!.isEmpty) { + return 'Email is required.'; + } + return null; + }, + ), + SizedBox(height: 15.toResponsiveHeight), + TextFormField( + // initialValue: R"pistol", + key: const Key('passwordField'), + cursorColor: Theme.of(context).textTheme.headline1!.color, + decoration: InputDecoration( + labelText: 'Password', + isDense: true, + prefixIcon: Icon( + Icons.lock, + size: 28.toResponsiveFont, + )), + obscureText: true, + controller: _passwordController, + validator: (value) { + if (value!.isEmpty) { + return 'Password is required.'; + } + return null; + }, + ), + SizedBox(height: 18.toResponsiveHeight), + ElevatedButton( + key: const Key('loginButton'), + style: ElevatedButton.styleFrom( + primary: Theme.of(context).primaryColor, + ), + onPressed: () { + if (_key.currentState!.validate()) { + widget.authenticationBloc.add(UserLogin( + email: _emailController.text, + password: _passwordController.text)); + } else {} + }, + child: widget.state is AuthenticationLoading + ? CircularProgressIndicator( + backgroundColor: Theme.of(context).backgroundColor, + ) + : Text( + 'Login', + style: Theme.of(context) + .textTheme + .bodyText1! + .copyWith(fontSize: 15.toResponsiveFont), + ), + ) + ], + ), + ); + } +} diff --git a/lib/screens/signup/signup_screen.dart b/lib/screens/signup/signup_screen.dart new file mode 100644 index 00000000..1930c20f --- /dev/null +++ b/lib/screens/signup/signup_screen.dart @@ -0,0 +1,143 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:fluttertoast/fluttertoast.dart'; +import 'package:go_router/go_router.dart'; + +import '../../common_export.dart'; + +class SignUpScreen extends StatefulWidget { + const SignUpScreen({Key? key}) : super(key: key); + + @override + State createState() => _SignUpScreenState(); +} + +class _SignUpScreenState extends State { + late final AuthenticationBloc authenticationBloc; + + @override + void initState() { + super.initState(); + authenticationBloc = BlocProvider.of(context); + } + + void _showError(String error) async { + await Fluttertoast.showToast( + msg: error, + toastLength: Toast.LENGTH_SHORT, + gravity: ToastGravity.BOTTOM, + timeInSecForIosWeb: 3, + backgroundColor: Theme.of(context).errorColor, + textColor: Colors.white, + fontSize: 16.0); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + body: WillPopScope( + onWillPop: () async => false, + child: BlocListener( + bloc: authenticationBloc, + listener: (context, state) { + if (state is AuthenticationFailure) { + _showError(state.message); + } + if (state is AppAutheticated) { + context.go('/home'); + } + }, + child: BlocBuilder( + bloc: authenticationBloc, + builder: (BuildContext context, AuthenticationState state) { + return SafeArea( + child: Stack( + children: [ + Responsive.isDesktop(context) + ? Center( + child: Card( + elevation: 15, + child: SizedBox( + width: 500.toResponsiveWidth, + height: 650.toResponsiveHeight, + child: _authenticationForm(context, state)), + ), + ) + : SingleChildScrollView( + child: _authenticationForm(context, state), + ), + Positioned( + left: 6, + child: IconButton( + icon: Icon( + Icons.arrow_back_ios, + size: 28, + color: Theme.of(context).textTheme.headline1!.color, + ), + onPressed: () { + context.pop(); + }, + ), + ), + ], + )); + }, + ), + ), + ), + ); + } + + Widget _authenticationForm(BuildContext context, AuthenticationState state) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Center( + child: Image.asset( + AllImages().signup, + width: 260.toResponsiveWidth, + height: 250.toResponsiveHeight, + ), + ), + SizedBox(height: 12.toResponsiveHeight), + Container( + margin: EdgeInsets.symmetric(horizontal: 32.toResponsiveWidth), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text('Sign Up', style: Theme.of(context).textTheme.headline1), + SizedBox(height: 15.toResponsiveHeight), + SignUpForm( + authenticationBloc: authenticationBloc, + state: state, + ), + ], + ), + ), + SizedBox(height: 32.toResponsiveHeight), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + 'Already have an account?', + style: Theme.of(context) + .textTheme + .bodyText2! + .copyWith(fontSize: 12.toResponsiveFont), + ), + InkWell( + child: Text( + ' Login', + style: Theme.of(context).textTheme.bodyText2!.copyWith( + fontSize: 13.toResponsiveFont, + color: Theme.of(context).primaryColor), + ), + onTap: () { + context.pop(); + }), + ], + ), + ], + ); + } +} diff --git a/lib/screens/signup/widgets/signup_form.dart b/lib/screens/signup/widgets/signup_form.dart new file mode 100644 index 00000000..288fabb7 --- /dev/null +++ b/lib/screens/signup/widgets/signup_form.dart @@ -0,0 +1,120 @@ +import 'package:flutter/material.dart'; + +import '../../../common_export.dart'; + +class SignUpForm extends StatefulWidget { + final AuthenticationBloc authenticationBloc; + final AuthenticationState state; + const SignUpForm( + {Key? key, required this.authenticationBloc, required this.state}) + : super(key: key); + @override + State createState() => _SignUpFormState(); +} + +class _SignUpFormState extends State { + final GlobalKey _key = GlobalKey(); + final _passwordController = TextEditingController(); + final _emailController = TextEditingController(); + final _nameController = TextEditingController(); + + @override + Widget build(BuildContext context) { + return Form( + key: _key, + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + TextFormField( + key: const Key('nameField'), + cursorColor: Theme.of(context).textTheme.headline1!.color, + decoration: InputDecoration( + labelText: 'Name', + isDense: true, + prefixIcon: Icon( + Icons.person, + size: 28.toResponsiveFont, + ), + ), + controller: _nameController, + keyboardType: TextInputType.name, + autocorrect: false, + validator: (value) { + if (value!.isEmpty) { + return 'Name is required.'; + } + return null; + }, + ), + SizedBox(height: 15.toResponsiveHeight), + TextFormField( + key: const Key('emailField'), + cursorColor: Theme.of(context).textTheme.headline1!.color, + decoration: InputDecoration( + labelText: 'Email address', + isDense: true, + prefixIcon: Icon( + Icons.email, + size: 28.toResponsiveFont, + ), + ), + controller: _emailController, + keyboardType: TextInputType.emailAddress, + autocorrect: false, + validator: (value) { + if (value!.isEmpty) { + return 'Email is required.'; + } + return null; + }, + ), + SizedBox(height: 15.toResponsiveHeight), + TextFormField( + key: const Key('passwordField'), + cursorColor: Theme.of(context).textTheme.headline1!.color, + decoration: InputDecoration( + labelText: 'Password', + isDense: true, + prefixIcon: Icon( + Icons.lock, + size: 28.toResponsiveFont, + )), + obscureText: true, + controller: _passwordController, + validator: (value) { + if (value!.isEmpty) { + return 'Password is required.'; + } + return null; + }, + ), + SizedBox(height: 18.toResponsiveHeight), + ElevatedButton( + key: const Key('signupButton'), + style: ElevatedButton.styleFrom( + primary: Theme.of(context).primaryColor, + ), + onPressed: () { + if (_key.currentState!.validate()) { + widget.authenticationBloc.add(UserSignUp( + email: _emailController.text, + password: _passwordController.text)); + } else {} + }, + child: widget.state is AuthenticationLoading + ? CircularProgressIndicator( + backgroundColor: Theme.of(context).backgroundColor, + ) + : Text( + 'Sign Up', + style: Theme.of(context) + .textTheme + .bodyText1! + .copyWith(fontSize: 15.toResponsiveFont), + ), + ) + ], + ), + ); + } +} diff --git a/lib/screens/splash/splash_screen.dart b/lib/screens/splash/splash_screen.dart new file mode 100644 index 00000000..44492899 --- /dev/null +++ b/lib/screens/splash/splash_screen.dart @@ -0,0 +1,49 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:go_router/go_router.dart'; + +import '../../common_export.dart'; + +class SplashScreen extends StatefulWidget { + const SplashScreen({Key? key}) : super(key: key); + + @override + State createState() => _SplashScreenState(); +} + +class _SplashScreenState extends State { + late AuthenticationBloc authenticationBloc; + @override + Widget build(BuildContext context) { + UiSizeConfig().init(context); + return Scaffold( + backgroundColor: Theme.of(context).backgroundColor, + body: BlocListener( + bloc: authenticationBloc, + listener: (BuildContext context, AuthenticationState state) { + if (state is AppAutheticated) { + context.go('/home'); + } + if (state is AuthenticationStart) { + context.go('/login'); + } + if (state is UserLogoutState) { + context.go('/login'); + } + }, + child: BlocBuilder( + bloc: authenticationBloc, + builder: (BuildContext context, AuthenticationState state) { + return Center(child: Image.asset(AllImages().logo)); + }), + ), + ); + } + + @override + void initState() { + authenticationBloc = BlocProvider.of(context); + authenticationBloc.add(const AppLoadedup()); + super.initState(); + } +} diff --git a/lib/shared/bloc/authentication/authentication_bloc.dart b/lib/shared/bloc/authentication/authentication_bloc.dart new file mode 100644 index 00000000..de0e0634 --- /dev/null +++ b/lib/shared/bloc/authentication/authentication_bloc.dart @@ -0,0 +1,106 @@ +import 'package:equatable/equatable.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; + +import '../../../common_export.dart'; + +part 'authentication_event.dart'; +part 'authentication_state.dart'; + +class AuthenticationBloc + extends Bloc { + final SharedPrefs prefs = SharedPrefs.instance; + final AuthenticationRepository _authenticationService; + + AuthenticationBloc({ + required AuthenticationRepository authenticationService, + }) : _authenticationService = authenticationService, + super(const AuthenticationInitial()) { + on(_mapAppSignUpLoadedState); + on(_mapUserSignupToState); + on(_mapUserLoginState); + on(_mapUserLogoutState); + on(_mapUserDataState); + } + + void _mapAppSignUpLoadedState( + AppLoadedup event, Emitter emit) async { + emit(const AuthenticationLoading()); + try { + await Future.delayed( + const Duration(milliseconds: 500)); // a simulated delay + if (prefs.getToken() != null) { + emit(const AppAutheticated()); + } else { + emit(const AuthenticationStart()); + } + } catch (e) { + emit(const AuthenticationFailure(message: 'An unknown error occurred')); + } + } + + void _mapUserLoginState( + UserLogin event, Emitter emit) async { + emit(const AuthenticationLoading()); + try { + await Future.delayed( + const Duration(milliseconds: 500)); // a simulated delay + final data = await _authenticationService.loginWithEmailAndPassword( + event.email, event.password!); + if (data["error"] == null) { + final currentUser = Token.fromJson(data); + if (currentUser != null) { + prefs.setToken(currentUser.token); + emit(const AppAutheticated()); + } else { + emit(AuthenticationNotAuthenticated()); + } + } else { + emit(AuthenticationFailure(message: data["error"])); + } + } catch (e) { + emit(AuthenticationFailure(message: e.toString())); + } + } + + void _mapUserSignupToState( + UserSignUp event, Emitter emit) async { + emit(const AuthenticationLoading()); + try { + await Future.delayed( + const Duration(milliseconds: 500)); // a simulated delay + final data = await _authenticationService.signUpWithEmailAndPassword( + event.email, event.password!); + + if (data["error"] == null) { + final currentUser = UserData.fromJson(data); + if (currentUser != null) { + prefs.setToken(currentUser.token); + prefs.setUserId(currentUser.id); + emit(const AppAutheticated()); + } else { + emit(AuthenticationNotAuthenticated()); + } + } else { + emit(AuthenticationFailure(message: data["error"])); + } + } catch (e) { + emit(AuthenticationFailure(message: e.toString())); + } + } + + void _mapUserLogoutState( + UserLogOut event, Emitter emit) async { + emit(const AuthenticationLoading()); + prefs.clear(); + emit(const UserLogoutState()); + } + + void _mapUserDataState( + GetUserData event, Emitter emit) async { + emit(const AuthenticationLoading()); + final currentUserId = prefs.getUserId(); + final data = await _authenticationService.getUserData(currentUserId ?? 4); + final currentUserData = CurrentUserData.fromJson(data); + emit(SetUserData(currentUserData: currentUserData)); + } +} diff --git a/lib/shared/bloc/authentication/authentication_event.dart b/lib/shared/bloc/authentication/authentication_event.dart new file mode 100644 index 00000000..abadfedf --- /dev/null +++ b/lib/shared/bloc/authentication/authentication_event.dart @@ -0,0 +1,39 @@ +part of 'authentication_bloc.dart'; + +abstract class AuthenticationEvent extends Equatable { + const AuthenticationEvent(); + + @override + List get props => []; +} + +// Fired just after the app is launched +class AppLoadedup extends AuthenticationEvent { + const AppLoadedup(); +} + +class UserLogOut extends AuthenticationEvent { + const UserLogOut(); +} + +class GetUserData extends AuthenticationEvent { + const GetUserData(); +} + +class UserSignUp extends AuthenticationEvent { + final String email; + final String? password; + const UserSignUp({required this.email, this.password}); + + @override + List get props => [email, password!]; +} + +class UserLogin extends AuthenticationEvent { + final String email; + final String? password; + const UserLogin({required this.email, this.password}); + + @override + List get props => [email, password!]; +} diff --git a/lib/shared/bloc/authentication/authentication_state.dart b/lib/shared/bloc/authentication/authentication_state.dart new file mode 100644 index 00000000..1c673789 --- /dev/null +++ b/lib/shared/bloc/authentication/authentication_state.dart @@ -0,0 +1,46 @@ +part of 'authentication_bloc.dart'; + +abstract class AuthenticationState extends Equatable { + const AuthenticationState(); + + @override + List get props => []; +} + +class AuthenticationInitial extends AuthenticationState { + const AuthenticationInitial(); +} + +class AppAutheticated extends AuthenticationState { + const AppAutheticated(); +} + +class AuthenticationLoading extends AuthenticationState { + const AuthenticationLoading(); +} + +class AuthenticationStart extends AuthenticationState { + const AuthenticationStart(); +} + +class UserLogoutState extends AuthenticationState { + const UserLogoutState(); +} + +class SetUserData extends AuthenticationState { + final CurrentUserData currentUserData; + const SetUserData({required this.currentUserData}); + @override + List get props => [currentUserData]; +} + +class AuthenticationNotAuthenticated extends AuthenticationState {} + +class AuthenticationFailure extends AuthenticationState { + final String message; + + const AuthenticationFailure({required this.message}); + + @override + List get props => [message]; +} diff --git a/lib/shared/bloc/bloc_controller.dart b/lib/shared/bloc/bloc_controller.dart new file mode 100644 index 00000000..f1a15fa6 --- /dev/null +++ b/lib/shared/bloc/bloc_controller.dart @@ -0,0 +1,6 @@ +class AuthenticationBlocController { + AuthenticationBlocController._(); + static final AuthenticationBlocController _instance = + AuthenticationBlocController._(); + factory AuthenticationBlocController() => _instance; +} diff --git a/lib/shared/bloc/update_theme/update_theme_bloc.dart b/lib/shared/bloc/update_theme/update_theme_bloc.dart new file mode 100644 index 00000000..cebc977b --- /dev/null +++ b/lib/shared/bloc/update_theme/update_theme_bloc.dart @@ -0,0 +1,15 @@ +import 'package:equatable/equatable.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; + +part 'update_theme_event.dart'; +part 'update_theme_state.dart'; + +class UpdateThemeBloc extends Bloc { + UpdateThemeBloc() : super(const SetTheme(appTheme: AppTheme.light)) { + on((event, emit) { + if (event is UpdateTheme) { + emit(SetTheme(appTheme: event.appTheme)); + } + }); + } +} diff --git a/lib/shared/bloc/update_theme/update_theme_event.dart b/lib/shared/bloc/update_theme/update_theme_event.dart new file mode 100644 index 00000000..85776e95 --- /dev/null +++ b/lib/shared/bloc/update_theme/update_theme_event.dart @@ -0,0 +1,18 @@ +part of 'update_theme_bloc.dart'; + +enum AppTheme { light, dark } + +abstract class UpdateThemeEvent extends Equatable { + const UpdateThemeEvent(); + + @override + List get props => []; +} + +class UpdateTheme extends UpdateThemeEvent { + final AppTheme appTheme; + const UpdateTheme({required this.appTheme}); + + @override + List get props => [appTheme]; +} diff --git a/lib/shared/bloc/update_theme/update_theme_state.dart b/lib/shared/bloc/update_theme/update_theme_state.dart new file mode 100644 index 00000000..a9af3891 --- /dev/null +++ b/lib/shared/bloc/update_theme/update_theme_state.dart @@ -0,0 +1,14 @@ +part of 'update_theme_bloc.dart'; + +abstract class UpdateThemeState extends Equatable { + const UpdateThemeState(); + @override + List get props => []; +} + +class SetTheme extends UpdateThemeState { + final AppTheme appTheme; + const SetTheme({required this.appTheme}); + @override + List get props => [appTheme]; +} diff --git a/lib/shared/models/current_user_data.dart b/lib/shared/models/current_user_data.dart new file mode 100644 index 00000000..6c1fe012 --- /dev/null +++ b/lib/shared/models/current_user_data.dart @@ -0,0 +1,76 @@ +class CurrentUserData { + Data? data; + Support? support; + + CurrentUserData({this.data, this.support}); + + CurrentUserData.fromJson(Map json) { + data = json['data'] != null ? Data.fromJson(json['data']) : Data(); + support = + json['support'] != null ? Support.fromJson(json['support']) : Support(); + } + + Map toJson() { + final Map data = {}; + if (this.data != null) { + data['data'] = this.data!.toJson(); + } + if (support != null) { + data['support'] = support!.toJson(); + } + return data; + } +} + +class Data { + late int? id; + late String email; + late String firstName; + late String lastName; + late String avatar; + + Data( + {this.id, + this.email = '', + this.firstName = '', + this.lastName = '', + this.avatar = ''}); + + Data.fromJson(Map json) { + id = json['id']; + email = json['email']; + firstName = json['first_name']; + lastName = json['last_name']; + avatar = json['avatar']; + } + + Map toJson() { + final Map data = {}; + data['id'] = id; + data['email'] = email; + data['first_name'] = firstName; + data['last_name'] = lastName; + data['avatar'] = avatar; + return data; + } +} + +class Support { + late String url; + late String text; + + Support({this.url = '', this.text = ''}); + + Support.fromJson(Map json) { + url = json['url']; + text = json['text']; + } + + Map toJson() { + final Map data = {}; + + data['url'] = url; + data['text'] = text; + return data; + } +} diff --git a/examples/github-repository-list/shared/lib/modules/authentication/models/firebase_user.dart b/lib/shared/models/firebase_user.dart similarity index 77% rename from examples/github-repository-list/shared/lib/modules/authentication/models/firebase_user.dart rename to lib/shared/models/firebase_user.dart index 21d507ca..9362ee45 100644 --- a/examples/github-repository-list/shared/lib/modules/authentication/models/firebase_user.dart +++ b/lib/shared/models/firebase_user.dart @@ -5,9 +5,9 @@ class UserFromFirebaseUser { final String avatar; UserFromFirebaseUser({ - this.uid, - this.email, - this.token, + required this.uid, + required this.email, + required this.token, this.avatar = "https://i.pinimg.com/736x/89/90/48/899048ab0cc455154006fdb9676964b3.jpg", }); diff --git a/examples/weather-app/shared/lib/modules/authentication/models/token.dart b/lib/shared/models/token.dart similarity index 52% rename from examples/weather-app/shared/lib/modules/authentication/models/token.dart rename to lib/shared/models/token.dart index 41f1f92a..cdd45795 100644 --- a/examples/weather-app/shared/lib/modules/authentication/models/token.dart +++ b/lib/shared/models/token.dart @@ -1,15 +1,15 @@ class Token { - String token; + late String token; - Token({this.token}); + Token({required this.token}); Token.fromJson(Map json) { token = json['token']; } Map toJson() { - final Map data = new Map(); - data['token'] = this.token; + final Map data = {}; + data['token'] = token; return data; } } diff --git a/shared/lib/modules/authentication/models/user.dart b/lib/shared/models/user.dart similarity index 60% rename from shared/lib/modules/authentication/models/user.dart rename to lib/shared/models/user.dart index 739c8a04..8c73672c 100644 --- a/shared/lib/modules/authentication/models/user.dart +++ b/lib/shared/models/user.dart @@ -1,10 +1,8 @@ -import 'package:meta/meta.dart'; - class MyUser { final String name; final String email; - MyUser({@required this.name, @required this.email}); + MyUser({required this.name, required this.email}); @override String toString() => 'User { name: $name, email: $email}'; diff --git a/lib/shared/models/user_data.dart b/lib/shared/models/user_data.dart new file mode 100644 index 00000000..2eb87864 --- /dev/null +++ b/lib/shared/models/user_data.dart @@ -0,0 +1,18 @@ +class UserData { + late int id; + late String token; + + UserData({required this.id, required this.token}); + + UserData.fromJson(Map json) { + id = json['id']; + token = json['token']; + } + + Map toJson() { + final Map data = {}; + data['id'] = id; + data['token'] = token; + return data; + } +} diff --git a/shared/lib/modules/authentication/resources/authentication_repository.dart b/lib/shared/repository/authentication_repository.dart similarity index 76% rename from shared/lib/modules/authentication/resources/authentication_repository.dart rename to lib/shared/repository/authentication_repository.dart index 16671e39..839f3292 100644 --- a/shared/lib/modules/authentication/resources/authentication_repository.dart +++ b/lib/shared/repository/authentication_repository.dart @@ -1,9 +1,9 @@ -import 'package:api_sdk/main.dart'; +import '../../common_export.dart'; class AuthenticationRepository { Future signUpWithEmailAndPassword( String email, String password) async { - await Future.delayed(Duration(seconds: 1)); // simulate a network delay + await Future.delayed(const Duration(seconds: 1)); final response = await ApiSdk.signUpWithEmailAndPassword( {'email': email, 'password': password}); @@ -12,7 +12,7 @@ class AuthenticationRepository { Future loginWithEmailAndPassword( String email, String password) async { - await Future.delayed(Duration(seconds: 1)); // simulate a network delay + await Future.delayed(const Duration(seconds: 1)); final response = await ApiSdk.loginWithEmailAndPassword( {'email': email, 'password': password}); diff --git a/lib/shared/shared.dart b/lib/shared/shared.dart new file mode 100644 index 00000000..dae32b70 --- /dev/null +++ b/lib/shared/shared.dart @@ -0,0 +1,26 @@ +import 'package:shared_preferences/shared_preferences.dart'; + +class SharedPrefs { + SharedPrefs._(); + + static final SharedPrefs _instance = SharedPrefs._(); + static SharedPrefs get instance => _instance; + + late SharedPreferences _prefs; + + Future init() async => _prefs = await SharedPreferences.getInstance(); + + Future remove(String key) async => await _prefs.remove(key); + + Future clear() async => await _prefs.clear(); + + /// Setters + Future setToken(String value) async => + await _prefs.setString('authtoken', value); + Future setUserId(int value) async => + await _prefs.setInt('userId', value); + + /// Getters + String? getToken() => _prefs.getString('authtoken'); + int? getUserId() => _prefs.getInt('userId'); +} diff --git a/lib/themes/color_constants.dart b/lib/themes/color_constants.dart new file mode 100644 index 00000000..0cb1a8b5 --- /dev/null +++ b/lib/themes/color_constants.dart @@ -0,0 +1,14 @@ +import 'package:flutter/material.dart'; + +class ColorConstants { + ColorConstants._(); + static final ColorConstants _instance = ColorConstants._(); + factory ColorConstants() => _instance; + Color primaryColor = const Color(0xFF0164ff); + Color primaryDarkColor = const Color(0xffA39BDB); + Color lightBackgroundColor = Colors.white; + Color darkBackgroundColor = const Color(0xff313131); + Color primaryTextLight = Colors.black; + Color primaryTextDark = Colors.white; + Color accentColor = const Color(0xffA39BDB); +} diff --git a/examples/hacker-news/app/lib/src/config/theme_data.dart b/lib/themes/theme_data.dart similarity index 67% rename from examples/hacker-news/app/lib/src/config/theme_data.dart rename to lib/themes/theme_data.dart index 5f76a010..dbc0dc6d 100644 --- a/examples/hacker-news/app/lib/src/config/theme_data.dart +++ b/lib/themes/theme_data.dart @@ -7,44 +7,47 @@ import 'color_constants.dart'; class ThemeConfig { static ThemeData get darkTheme => createTheme( brightness: Brightness.dark, - background: ColorConstants.darkScaffoldBackgroundColor, - cardBackground: ColorConstants.secondaryDarkAppColor, - primaryText: Colors.white, - secondaryText: Colors.black, - accentColor: ColorConstants.secondaryDarkAppColor, + background: ColorConstants().darkBackgroundColor, + primaryColor: ColorConstants().primaryColor, + cardBackground: ColorConstants().darkBackgroundColor, + primaryText: ColorConstants().primaryTextDark, + secondaryText: ColorConstants().primaryTextLight, + accentColor: ColorConstants().accentColor, divider: Colors.black45, buttonBackground: Colors.white, - buttonText: ColorConstants.secondaryDarkAppColor, - disabled: ColorConstants.secondaryDarkAppColor, + buttonText: ColorConstants().darkBackgroundColor, + disabled: ColorConstants().darkBackgroundColor, error: Colors.red, ); static ThemeData get lightTheme => createTheme( brightness: Brightness.light, - background: ColorConstants.lightScaffoldBackgroundColor, - cardBackground: ColorConstants.secondaryAppColor, - primaryText: Colors.black, - secondaryText: Colors.white, - accentColor: ColorConstants.secondaryAppColor, - divider: ColorConstants.secondaryAppColor, + background: ColorConstants().lightBackgroundColor, + primaryColor: ColorConstants().primaryColor, + cardBackground: ColorConstants().lightBackgroundColor, + primaryText: ColorConstants().primaryTextLight, + secondaryText: ColorConstants().primaryTextDark, + accentColor: ColorConstants().accentColor, + divider: ColorConstants().lightBackgroundColor, buttonBackground: Colors.black38, - buttonText: ColorConstants.secondaryAppColor, - disabled: ColorConstants.secondaryAppColor, + buttonText: ColorConstants().lightBackgroundColor, + disabled: ColorConstants().lightBackgroundColor, error: Colors.red, ); static ThemeData createTheme({ - Brightness brightness, - Color background, - Color primaryText, - Color secondaryText, - Color accentColor, - Color divider, - Color buttonBackground, - Color buttonText, - Color cardBackground, - Color disabled, - Color error, + required Brightness brightness, + required Color background, + required Color primaryText, + required Color secondaryText, + required Color accentColor, + required Color divider, + required Color buttonBackground, + required Color buttonText, + required Color cardBackground, + required Color disabled, + required Color error, + required Color primaryColor, }) { final baseTextTheme = brightness == Brightness.dark ? Typography.blackMountainView @@ -69,12 +72,12 @@ class ThemeConfig { style: ButtonStyle( shape: MaterialStateProperty.all( RoundedRectangleBorder( - borderRadius: BorderRadius.circular(18.0), - side: BorderSide(color: Colors.red))), + borderRadius: BorderRadius.circular(9.0), + )), padding: MaterialStateProperty.all( - const EdgeInsets.all(16)))), + const EdgeInsets.all(18.5)))), backgroundColor: background, - primaryColor: accentColor, + primaryColor: primaryColor, toggleableActiveColor: accentColor, appBarTheme: AppBarTheme( systemOverlayStyle: @@ -84,13 +87,13 @@ class ThemeConfig { color: secondaryText, ), toolbarTextStyle: TextTheme( - bodyText1: baseTextTheme.bodyText1.copyWith( + bodyText1: baseTextTheme.bodyText1?.copyWith( color: secondaryText, fontSize: 18, ), ).bodyText2, titleTextStyle: TextTheme( - bodyText1: baseTextTheme.bodyText1.copyWith( + bodyText1: baseTextTheme.bodyText1?.copyWith( color: secondaryText, fontSize: 18, ), @@ -138,66 +141,66 @@ class ThemeConfig { ), fontFamily: '', textTheme: TextTheme( - headline1: baseTextTheme.headline1.copyWith( + headline1: baseTextTheme.headline1?.copyWith( color: primaryText, fontSize: 34.0, fontWeight: FontWeight.bold, ), - headline2: baseTextTheme.headline2.copyWith( + headline2: baseTextTheme.headline2?.copyWith( color: primaryText, fontSize: 22, fontWeight: FontWeight.bold, ), - headline3: baseTextTheme.headline3.copyWith( + headline3: baseTextTheme.headline3?.copyWith( color: secondaryText, fontSize: 20, fontWeight: FontWeight.w600, ), - headline4: baseTextTheme.headline4.copyWith( + headline4: baseTextTheme.headline4?.copyWith( color: primaryText, fontSize: 18, fontWeight: FontWeight.w600, ), - headline5: baseTextTheme.headline5.copyWith( + headline5: baseTextTheme.headline5?.copyWith( color: primaryText, fontSize: 16, fontWeight: FontWeight.w700, ), - headline6: baseTextTheme.headline6.copyWith( + headline6: baseTextTheme.headline6?.copyWith( color: primaryText, fontSize: 14, fontWeight: FontWeight.w700, ), - bodyText1: baseTextTheme.bodyText1.copyWith( + bodyText1: baseTextTheme.bodyText1?.copyWith( color: secondaryText, - fontSize: 15, + fontSize: 14, ), - bodyText2: baseTextTheme.bodyText2.copyWith( + bodyText2: baseTextTheme.bodyText2?.copyWith( color: primaryText, fontSize: 12, fontWeight: FontWeight.w400, ), - button: baseTextTheme.button.copyWith( + button: baseTextTheme.button?.copyWith( color: primaryText, fontSize: 12.0, fontWeight: FontWeight.w700, ), - caption: baseTextTheme.caption.copyWith( + caption: baseTextTheme.caption?.copyWith( color: primaryText, fontSize: 11.0, fontWeight: FontWeight.w300, ), - overline: baseTextTheme.overline.copyWith( + overline: baseTextTheme.overline?.copyWith( color: secondaryText, fontSize: 11.0, fontWeight: FontWeight.w500, ), - subtitle1: baseTextTheme.subtitle1.copyWith( + subtitle1: baseTextTheme.subtitle1?.copyWith( color: primaryText, fontSize: 16.0, fontWeight: FontWeight.w700, ), - subtitle2: baseTextTheme.subtitle2.copyWith( + subtitle2: baseTextTheme.subtitle2?.copyWith( color: secondaryText, fontSize: 11.0, fontWeight: FontWeight.w500, diff --git a/app/lib/src/config/image_constants.dart b/lib/utils/image_constants.dart similarity index 64% rename from app/lib/src/config/image_constants.dart rename to lib/utils/image_constants.dart index e9a8cc01..e1c5cc58 100644 --- a/app/lib/src/config/image_constants.dart +++ b/lib/utils/image_constants.dart @@ -1,10 +1,12 @@ class AllImages { AllImages._(); - static AllImages _instance = AllImages._(); + static final AllImages _instance = AllImages._(); factory AllImages() => _instance; String image = 'assets/image'; String logo = 'assets/images/logo.png'; + String login = 'assets/images/login.png'; + String signup = 'assets/images/signup.png'; String kDefaultImage = 'https://cdn.pixabay.com/photo/2016/08/08/09/17/avatar-1577909_1280.png'; } diff --git a/lib/utils/responsive.dart b/lib/utils/responsive.dart new file mode 100644 index 00000000..1889641c --- /dev/null +++ b/lib/utils/responsive.dart @@ -0,0 +1,47 @@ +import 'package:flutter/material.dart'; + +class Responsive extends StatelessWidget { + final Widget mobile; + final Widget tablet; + final Widget desktop; + + const Responsive({ + Key? key, + required this.mobile, + required this.tablet, + required this.desktop, + }) : super(key: key); + + /// We will modify based on our design dimension for each type. + + // This isMobile, isTablet, isDesktop + static bool isMobile(BuildContext context) => + MediaQuery.of(context).size.width <= 620; + + static bool isTablet(BuildContext context) => + MediaQuery.of(context).size.width <= 1030 && + MediaQuery.of(context).size.width > 620; + + static bool isDesktop(BuildContext context) => + MediaQuery.of(context).size.width > 1030; + + @override + Widget build(BuildContext context) { + return LayoutBuilder( + // If our width is more than 1030 then we consider it a desktop + builder: (context, constraints) { + if (MediaQuery.of(context).size.width >= 1030) { + return desktop; + } + // If width it less then 1030 and more then 620 we consider it as tablet + else if (MediaQuery.of(context).size.width > 620) { + return tablet; + } + // Or less then that we called it mobile + else { + return mobile; + } + }, + ); + } +} diff --git a/lib/utils/size_utils.dart b/lib/utils/size_utils.dart new file mode 100644 index 00000000..4740ed15 --- /dev/null +++ b/lib/utils/size_utils.dart @@ -0,0 +1,182 @@ +import 'package:flutter/material.dart'; + +import '../common_export.dart'; + +/// [SizeConfig] to make project scalable +class UiSizeConfig { + static MediaQueryData? _mediaQueryData; + static bool isMobile = false, isTablet = false, isDesktop = true; + static double? screenWidth, + screenHeight, + blockSizeHorizontal, + blockSizeVertical, + _safeAreaHorizontal, + _safeAreaVertical, + safeBlockHorizontal, + safeBlockVertical, + profileDrawerWidth, + refHeight, + refWidth, + refMobileHeight, + refMobileWidth, + refTabletHeight, + refTabletWidth; + + void init(BuildContext context) { + _mediaQueryData = MediaQuery.of(context); + screenWidth = _mediaQueryData!.size.width; + screenHeight = _mediaQueryData!.size.height; + refHeight = 897; + refWidth = 1366; + refTabletHeight = 1024; + refTabletWidth = 768; + refMobileHeight = 760; + refMobileWidth = 360; + isDesktop = Responsive.isDesktop(context); + isMobile = Responsive.isMobile(context); + isTablet = Responsive.isTablet(context); + + if (screenHeight! < 1200) { + blockSizeHorizontal = screenWidth! / 100; + blockSizeVertical = screenHeight! / 100; + + _safeAreaHorizontal = + _mediaQueryData!.padding.left + _mediaQueryData!.padding.right; + _safeAreaVertical = + _mediaQueryData!.padding.top + _mediaQueryData!.padding.bottom; + safeBlockHorizontal = (screenWidth! - _safeAreaHorizontal!) / 100; + safeBlockVertical = (screenHeight! - _safeAreaVertical!) / 100; + } else { + blockSizeHorizontal = screenWidth! / 120; + blockSizeVertical = screenHeight! / 120; + + _safeAreaHorizontal = + _mediaQueryData!.padding.left + _mediaQueryData!.padding.right; + _safeAreaVertical = + _mediaQueryData!.padding.top + _mediaQueryData!.padding.bottom; + safeBlockHorizontal = (screenWidth! - _safeAreaHorizontal!) / 120; + safeBlockVertical = (screenHeight! - _safeAreaVertical!) / 120; + } + } + + static double getWidthRatio(double val) { + double res = (val / refWidth!) * 100; + return res * blockSizeHorizontal! > 2800 + ? 2400 + : res * blockSizeHorizontal!; + } + + static double getHeightRatio(double val) { + double res = (val / refHeight!) * 100; + return res * blockSizeVertical!; + } + + static double getFontRatio(double val) { + // double res = (val / refWidth!) * 100; + // if (screenWidth! > screenHeight!) { + // return res * safeBlockHorizontal!; + // } else { + // return res * safeBlockVertical!; + // } + return val; + } + + static double getTabletWidthRatio(double val) { + double res = (val / refTabletWidth!) * 100; + return res * blockSizeHorizontal!; + } + + static double getTabletHeightRatio(double val) { + double res = (val / refTabletHeight!) * 100; + return res * blockSizeVertical!; + } + + static double getTabletFontRatio(double val) { + double res = (val / refTabletWidth!) * 100; + if (screenWidth! < screenHeight!) { + return res * safeBlockHorizontal!; + } else { + return res * safeBlockVertical!; + } + } + + static double getMobileWidthRatio(double val) { + double res = (val / refMobileWidth!) * 100; + return res * blockSizeHorizontal!; + } + + static double getMobileHeightRatio(double val) { + double res = (val / refMobileHeight!) * 100; + return res * blockSizeVertical!; + } + + static double getMobileFontRatio(double val) { + double res = (val / refMobileWidth!) * 100; + if (screenWidth! < screenHeight!) { + return res * safeBlockHorizontal!; + } else { + return res * safeBlockVertical!; + } + } + + static double getResponsiveFont(double val) { + if (isMobile) { + return val.toMobileFont; + } else if (isTablet) { + return val.toTabletFont; + } else { + return val.toFont; + } + } + + static double getResponsiveHeight(double val) { + if (isMobile) { + return val.toMobileHeight; + } else if (isTablet) { + return val.toTabletHeight; + } else { + return val.toHeight; + } + } + + static double getResponsiveWidth(double val) { + if (isMobile) { + return val.toMobileWidth; + } else if (isTablet) { + return val.toTabletWidth; + } else { + return val.toWidth; + } + } +} + +extension SizeUtils on num { + double get toWidth => UiSizeConfig.getWidthRatio(this.toDouble()); + + double get toHeight => UiSizeConfig.getHeightRatio(this.toDouble()); + + double get toFont => UiSizeConfig.getFontRatio(this.toDouble()); + + double get toTabletWidth => UiSizeConfig.getTabletWidthRatio(this.toDouble()); + + double get toTabletHeight => + UiSizeConfig.getTabletHeightRatio(this.toDouble()); + + double get toTabletFont => UiSizeConfig.getTabletFontRatio(this.toDouble()); + + double get toMobileWidth => UiSizeConfig.getMobileWidthRatio(this.toDouble()); + + double get toMobileHeight => + UiSizeConfig.getMobileHeightRatio(this.toDouble()); + + double get toMobileFont => UiSizeConfig.getMobileFontRatio(this.toDouble()); + + double get toResponsiveFont => + UiSizeConfig.getResponsiveFont(this.toDouble()); + + double get toResponsiveHeight => + UiSizeConfig.getResponsiveHeight(this.toDouble()); + + double get toResponsiveWidth => + UiSizeConfig.getResponsiveWidth(this.toDouble()); +} diff --git a/lib/utils/string_constants.dart b/lib/utils/string_constants.dart new file mode 100644 index 00000000..419ab238 --- /dev/null +++ b/lib/utils/string_constants.dart @@ -0,0 +1 @@ +library constants; diff --git a/examples/book-store-firebase/app/lib/src/widgets/cache_image_widget.dart b/lib/widgets/cache_image_widget.dart similarity index 64% rename from examples/book-store-firebase/app/lib/src/widgets/cache_image_widget.dart rename to lib/widgets/cache_image_widget.dart index 022f17d1..214b7e81 100644 --- a/examples/book-store-firebase/app/lib/src/widgets/cache_image_widget.dart +++ b/lib/widgets/cache_image_widget.dart @@ -1,10 +1,11 @@ -import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; +import 'package:cached_network_image/cached_network_image.dart'; + class CachedImage extends StatelessWidget { - CachedImage({ - Key key, - @required this.imageUrl, + const CachedImage({ + Key? key, + required this.imageUrl, this.fit = BoxFit.cover, this.height, this.width, @@ -15,10 +16,10 @@ class CachedImage extends StatelessWidget { final String imageUrl; final BoxFit fit; - final double height; - final double width; - final Widget placeholder; - final Widget errorWidget; + final double? height; + final double? width; + final Widget? placeholder; + final Widget? errorWidget; @override Widget build(BuildContext context) { @@ -27,9 +28,10 @@ class CachedImage extends StatelessWidget { fit: fit, height: height, width: width, - placeholder: (context, url) => placeholder ?? CircularProgressIndicator(), + placeholder: (context, url) => + placeholder ?? const CircularProgressIndicator(), errorWidget: (context, url, err) => - errorWidget ?? Icon(Icons.error_outline), + errorWidget ?? const Icon(Icons.error_outline), ); } } diff --git a/examples/book-store-firebase/app/linux/.gitignore b/linux/.gitignore similarity index 100% rename from examples/book-store-firebase/app/linux/.gitignore rename to linux/.gitignore diff --git a/examples/hacker-news/app/linux/CMakeLists.txt b/linux/CMakeLists.txt similarity index 73% rename from examples/hacker-news/app/linux/CMakeLists.txt rename to linux/CMakeLists.txt index 5c553c66..e77b8ce6 100644 --- a/examples/hacker-news/app/linux/CMakeLists.txt +++ b/linux/CMakeLists.txt @@ -1,11 +1,19 @@ +# Project-level configuration. cmake_minimum_required(VERSION 3.10) project(runner LANGUAGES CXX) -set(BINARY_NAME "app") -set(APPLICATION_ID "com.example.app") +# The name of the executable created for the application. Change this to change +# the on-disk name of your application. +set(BINARY_NAME "flutter_starter") +# The unique GTK application identifier for this application. See: +# https://wiki.gnome.org/HowDoI/ChooseApplicationID +set(APPLICATION_ID "com.example.flutter_starter") +# 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. @@ -18,7 +26,7 @@ if(FLUTTER_TARGET_PLATFORM_SYSROOT) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) endif() -# Configure build options. +# 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) @@ -27,6 +35,10 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 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) @@ -34,9 +46,8 @@ function(APPLY_STANDARD_SETTINGS TARGET) target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") endfunction() -set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") - # Flutter library and tool build rules. +set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") add_subdirectory(${FLUTTER_MANAGED_DIR}) # System-level dependencies. @@ -45,16 +56,27 @@ pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") -# Application build +# 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 @@ -94,11 +116,11 @@ install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR} install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) -if(PLUGIN_BUNDLED_LIBRARIES) - install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" +foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) + install(FILES "${bundled_library}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) -endif() +endforeach(bundled_library) # Fully re-copy the assets directory on each build to avoid having stale files # from a previous install. diff --git a/examples/github-repository-list/app/linux/flutter/CMakeLists.txt b/linux/flutter/CMakeLists.txt similarity index 97% rename from examples/github-repository-list/app/linux/flutter/CMakeLists.txt rename to linux/flutter/CMakeLists.txt index 33fd5801..d5bd0164 100644 --- a/examples/github-repository-list/app/linux/flutter/CMakeLists.txt +++ b/linux/flutter/CMakeLists.txt @@ -1,3 +1,4 @@ +# 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") diff --git a/examples/book-store-firebase/app/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc similarity index 100% rename from examples/book-store-firebase/app/linux/flutter/generated_plugin_registrant.cc rename to linux/flutter/generated_plugin_registrant.cc diff --git a/examples/book-store-firebase/app/linux/flutter/generated_plugin_registrant.h b/linux/flutter/generated_plugin_registrant.h similarity index 100% rename from examples/book-store-firebase/app/linux/flutter/generated_plugin_registrant.h rename to linux/flutter/generated_plugin_registrant.h diff --git a/examples/book-store-firebase/app/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake similarity index 61% rename from examples/book-store-firebase/app/linux/flutter/generated_plugins.cmake rename to linux/flutter/generated_plugins.cmake index 51436ae8..2e1de87a 100644 --- a/examples/book-store-firebase/app/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -5,6 +5,9 @@ list(APPEND FLUTTER_PLUGIN_LIST ) +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + set(PLUGIN_BUNDLED_LIBRARIES) foreach(plugin ${FLUTTER_PLUGIN_LIST}) @@ -13,3 +16,8 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST}) 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/examples/book-store-firebase/app/linux/main.cc b/linux/main.cc similarity index 100% rename from examples/book-store-firebase/app/linux/main.cc rename to linux/main.cc diff --git a/examples/book-store-firebase/app/linux/my_application.cc b/linux/my_application.cc similarity index 96% rename from examples/book-store-firebase/app/linux/my_application.cc rename to linux/my_application.cc index 42d9b08a..b3f88e4e 100644 --- a/examples/book-store-firebase/app/linux/my_application.cc +++ b/linux/my_application.cc @@ -40,11 +40,11 @@ static void my_application_activate(GApplication* application) { 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, "app"); + gtk_header_bar_set_title(header_bar, "flutter_starter"); 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, "app"); + gtk_window_set_title(window, "flutter_starter"); } gtk_window_set_default_size(window, 1280, 720); diff --git a/examples/book-store-firebase/app/linux/my_application.h b/linux/my_application.h similarity index 100% rename from examples/book-store-firebase/app/linux/my_application.h rename to linux/my_application.h diff --git a/examples/book-store-firebase/app/macos/.gitignore b/macos/.gitignore similarity index 100% rename from examples/book-store-firebase/app/macos/.gitignore rename to macos/.gitignore diff --git a/macos/Flutter/Flutter-Debug.xcconfig b/macos/Flutter/Flutter-Debug.xcconfig new file mode 100644 index 00000000..4b81f9b2 --- /dev/null +++ b/macos/Flutter/Flutter-Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/macos/Flutter/Flutter-Release.xcconfig b/macos/Flutter/Flutter-Release.xcconfig new file mode 100644 index 00000000..5caa9d15 --- /dev/null +++ b/macos/Flutter/Flutter-Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/examples/github-repository-list/app/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift similarity index 80% rename from examples/github-repository-list/app/macos/Flutter/GeneratedPluginRegistrant.swift rename to macos/Flutter/GeneratedPluginRegistrant.swift index 081ceae9..e9cf1927 100644 --- a/examples/github-repository-list/app/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,13 +5,11 @@ import FlutterMacOS import Foundation -import connectivity_plus_macos import path_provider_macos import shared_preferences_macos import sqflite func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { - ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) diff --git a/macos/Podfile b/macos/Podfile new file mode 100644 index 00000000..dade8dfa --- /dev/null +++ b/macos/Podfile @@ -0,0 +1,40 @@ +platform :osx, '10.11' + +# 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__)) +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_macos_build_settings(target) + end +end diff --git a/examples/hacker-news/app/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj similarity index 98% rename from examples/hacker-news/app/macos/Runner.xcodeproj/project.pbxproj rename to macos/Runner.xcodeproj/project.pbxproj index 87088f13..ed6efa63 100644 --- a/examples/hacker-news/app/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -54,7 +54,7 @@ /* Begin PBXFileReference section */ 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 /* app.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "app.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10ED2044A3C60003C045 /* flutter_starter.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "flutter_starter.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 = ""; }; @@ -105,7 +105,7 @@ 33CC10EE2044A3C60003C045 /* Products */ = { isa = PBXGroup; children = ( - 33CC10ED2044A3C60003C045 /* app.app */, + 33CC10ED2044A3C60003C045 /* flutter_starter.app */, ); name = Products; sourceTree = ""; @@ -172,7 +172,7 @@ ); name = Runner; productName = Runner; - productReference = 33CC10ED2044A3C60003C045 /* app.app */; + productReference = 33CC10ED2044A3C60003C045 /* flutter_starter.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -409,7 +409,7 @@ COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; + ENABLEABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; diff --git a/examples/book-store-firebase/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from examples/book-store-firebase/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/examples/hacker-news/app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme similarity index 93% rename from examples/hacker-news/app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme rename to macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 2aba2321..445623c0 100644 --- a/examples/hacker-news/app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -15,7 +15,7 @@ @@ -31,7 +31,7 @@ @@ -54,7 +54,7 @@ @@ -71,7 +71,7 @@ diff --git a/examples/book-store-firebase/app/ios/Runner.xcworkspace/contents.xcworkspacedata b/macos/Runner.xcworkspace/contents.xcworkspacedata similarity index 100% rename from examples/book-store-firebase/app/ios/Runner.xcworkspace/contents.xcworkspacedata rename to macos/Runner.xcworkspace/contents.xcworkspacedata diff --git a/examples/book-store-firebase/app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from examples/book-store-firebase/app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/examples/book-store-firebase/app/macos/Runner/AppDelegate.swift b/macos/Runner/AppDelegate.swift similarity index 100% rename from examples/book-store-firebase/app/macos/Runner/AppDelegate.swift rename to macos/Runner/AppDelegate.swift diff --git a/examples/book-store-firebase/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from examples/book-store-firebase/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json rename to macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/examples/book-store-firebase/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png similarity index 100% rename from examples/book-store-firebase/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png rename to macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png diff --git a/examples/book-store-firebase/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png similarity index 100% rename from examples/book-store-firebase/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png rename to macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png diff --git a/examples/book-store-firebase/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png similarity index 100% rename from examples/book-store-firebase/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png rename to macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png diff --git a/examples/book-store-firebase/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png similarity index 100% rename from examples/book-store-firebase/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png rename to macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png diff --git a/examples/book-store-firebase/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png similarity index 100% rename from examples/book-store-firebase/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png rename to macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png diff --git a/examples/book-store-firebase/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png similarity index 100% rename from examples/book-store-firebase/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png rename to macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png diff --git a/examples/book-store-firebase/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png similarity index 100% rename from examples/book-store-firebase/app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png rename to macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png diff --git a/examples/book-store-firebase/app/macos/Runner/Base.lproj/MainMenu.xib b/macos/Runner/Base.lproj/MainMenu.xib similarity index 100% rename from examples/book-store-firebase/app/macos/Runner/Base.lproj/MainMenu.xib rename to macos/Runner/Base.lproj/MainMenu.xib diff --git a/examples/book-store-firebase/app/macos/Runner/Configs/AppInfo.xcconfig b/macos/Runner/Configs/AppInfo.xcconfig similarity index 85% rename from examples/book-store-firebase/app/macos/Runner/Configs/AppInfo.xcconfig rename to macos/Runner/Configs/AppInfo.xcconfig index 11e3faa7..13b57fdd 100644 --- a/examples/book-store-firebase/app/macos/Runner/Configs/AppInfo.xcconfig +++ b/macos/Runner/Configs/AppInfo.xcconfig @@ -5,10 +5,10 @@ // 'flutter create' template. // The application's name. By default this is also the title of the Flutter window. -PRODUCT_NAME = app +PRODUCT_NAME = flutter_starter; // The application's bundle identifier -PRODUCT_BUNDLE_IDENTIFIER = com.example.app +PRODUCT_BUNDLE_IDENTIFIER = com.example.flutter_starter; // The copyright displayed in application information PRODUCT_COPYRIGHT = Copyright © 2022 com.example. All rights reserved. diff --git a/examples/book-store-firebase/app/macos/Runner/Configs/Debug.xcconfig b/macos/Runner/Configs/Debug.xcconfig similarity index 100% rename from examples/book-store-firebase/app/macos/Runner/Configs/Debug.xcconfig rename to macos/Runner/Configs/Debug.xcconfig diff --git a/examples/book-store-firebase/app/macos/Runner/Configs/Release.xcconfig b/macos/Runner/Configs/Release.xcconfig similarity index 100% rename from examples/book-store-firebase/app/macos/Runner/Configs/Release.xcconfig rename to macos/Runner/Configs/Release.xcconfig diff --git a/examples/book-store-firebase/app/macos/Runner/Configs/Warnings.xcconfig b/macos/Runner/Configs/Warnings.xcconfig similarity index 100% rename from examples/book-store-firebase/app/macos/Runner/Configs/Warnings.xcconfig rename to macos/Runner/Configs/Warnings.xcconfig diff --git a/examples/book-store-firebase/app/macos/Runner/DebugProfile.entitlements b/macos/Runner/DebugProfile.entitlements similarity index 100% rename from examples/book-store-firebase/app/macos/Runner/DebugProfile.entitlements rename to macos/Runner/DebugProfile.entitlements diff --git a/examples/book-store-firebase/app/macos/Runner/Info.plist b/macos/Runner/Info.plist similarity index 100% rename from examples/book-store-firebase/app/macos/Runner/Info.plist rename to macos/Runner/Info.plist diff --git a/examples/book-store-firebase/app/macos/Runner/MainFlutterWindow.swift b/macos/Runner/MainFlutterWindow.swift similarity index 100% rename from examples/book-store-firebase/app/macos/Runner/MainFlutterWindow.swift rename to macos/Runner/MainFlutterWindow.swift diff --git a/examples/book-store-firebase/app/macos/Runner/Release.entitlements b/macos/Runner/Release.entitlements similarity index 100% rename from examples/book-store-firebase/app/macos/Runner/Release.entitlements rename to macos/Runner/Release.entitlements diff --git a/app/pubspec.lock b/pubspec.lock similarity index 61% rename from app/pubspec.lock rename to pubspec.lock index 6a997195..b08f686d 100644 --- a/app/pubspec.lock +++ b/pubspec.lock @@ -1,41 +1,55 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: - api_sdk: + _fe_analyzer_shared: dependency: transitive description: - path: "../api_sdk" - relative: true - source: path - version: "1.0.0+1" + name: _fe_analyzer_shared + url: "https://pub.dartlang.org" + source: hosted + version: "47.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + url: "https://pub.dartlang.org" + source: hosted + version: "4.7.0" archive: dependency: transitive description: name: archive url: "https://pub.dartlang.org" source: hosted - version: "3.1.11" + version: "3.3.0" args: dependency: transitive description: name: args url: "https://pub.dartlang.org" source: hosted - version: "2.3.0" + version: "2.3.1" async: dependency: transitive description: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.8.2" + version: "2.9.0" bloc: dependency: "direct main" description: name: bloc url: "https://pub.dartlang.org" source: hosted - version: "8.0.2" + version: "8.1.0" + bloc_test: + dependency: "direct dev" + description: + name: bloc_test + url: "https://pub.dartlang.org" + source: hosted + version: "9.1.0" boolean_selector: dependency: transitive description: @@ -43,209 +57,265 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" + build: + dependency: transitive + description: + name: build + url: "https://pub.dartlang.org" + source: hosted + version: "2.3.1" + build_config: + dependency: transitive + description: + name: build_config + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + build_daemon: + dependency: transitive + description: + name: build_daemon + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.0" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.10" + build_runner: + dependency: "direct dev" + description: + name: build_runner + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.1" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + url: "https://pub.dartlang.org" + source: hosted + version: "7.2.4" + built_collection: + dependency: transitive + description: + name: built_collection + url: "https://pub.dartlang.org" + source: hosted + version: "5.1.1" + built_value: + dependency: "direct main" + description: + name: built_value + url: "https://pub.dartlang.org" + source: hosted + version: "8.4.1" + built_value_generator: + dependency: "direct dev" + description: + name: built_value_generator + url: "https://pub.dartlang.org" + source: hosted + version: "8.4.1" cached_network_image: dependency: "direct main" description: name: cached_network_image url: "https://pub.dartlang.org" source: hosted - version: "3.2.0" + version: "3.2.2" cached_network_image_platform_interface: dependency: transitive description: name: cached_network_image_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "2.0.0" cached_network_image_web: dependency: transitive description: name: cached_network_image_web url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "1.0.2" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" - charcode: + version: "1.2.1" + checked_yaml: dependency: transitive description: - name: charcode + name: checked_yaml url: "https://pub.dartlang.org" source: hosted - version: "1.3.1" + version: "2.0.1" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" - cloud_firestore: - dependency: "direct main" - description: - name: cloud_firestore - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.7" - cloud_firestore_platform_interface: - dependency: transitive - description: - name: cloud_firestore_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "5.4.12" - cloud_firestore_web: + version: "1.1.1" + code_builder: dependency: transitive description: - name: cloud_firestore_web + name: code_builder url: "https://pub.dartlang.org" source: hosted - version: "2.6.7" + version: "4.2.0" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0" + version: "1.16.0" connectivity_plus: dependency: transitive description: name: connectivity_plus url: "https://pub.dartlang.org" source: hosted - version: "1.4.0" + version: "2.3.9" connectivity_plus_linux: dependency: transitive description: name: connectivity_plus_linux url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" connectivity_plus_macos: dependency: transitive description: name: connectivity_plus_macos url: "https://pub.dartlang.org" source: hosted - version: "1.2.1" + version: "1.2.6" connectivity_plus_platform_interface: dependency: transitive description: name: connectivity_plus_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.3" connectivity_plus_web: dependency: transitive description: name: connectivity_plus_web url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.5" connectivity_plus_windows: dependency: transitive description: name: connectivity_plus_windows url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" - crypto: + version: "1.2.2" + convert: dependency: transitive description: - name: crypto + name: convert url: "https://pub.dartlang.org" source: hosted - version: "3.0.1" - cupertino_icons: - dependency: "direct main" + version: "3.0.2" + coverage: + dependency: transitive description: - name: cupertino_icons + name: coverage url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" - dbus: + version: "1.5.0" + crypto: dependency: transitive description: - name: dbus + name: crypto url: "https://pub.dartlang.org" source: hosted - version: "0.6.8" - equatable: + version: "3.0.2" + csslib: + dependency: transitive + description: + name: csslib + url: "https://pub.dartlang.org" + source: hosted + version: "0.17.2" + cupertino_icons: dependency: "direct main" description: - name: equatable + name: cupertino_icons url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" - fake_async: + version: "1.0.5" + dart_style: dependency: transitive description: - name: fake_async + name: dart_style url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" - ffi: + version: "2.2.4" + dbus: dependency: transitive description: - name: ffi + name: dbus url: "https://pub.dartlang.org" source: hosted - version: "1.1.2" - file: + version: "0.7.8" + diff_match_patch: dependency: transitive description: - name: file + name: diff_match_patch url: "https://pub.dartlang.org" source: hosted - version: "6.1.2" - firebase_auth: - dependency: transitive + version: "0.4.1" + dio: + dependency: "direct main" description: - name: firebase_auth + name: dio url: "https://pub.dartlang.org" source: hosted - version: "3.3.6" - firebase_auth_platform_interface: - dependency: transitive + version: "4.0.6" + equatable: + dependency: "direct main" description: - name: firebase_auth_platform_interface + name: equatable url: "https://pub.dartlang.org" source: hosted - version: "6.1.11" - firebase_auth_web: + version: "2.0.5" + fake_async: dependency: transitive description: - name: firebase_auth_web + name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "3.3.7" - firebase_core: - dependency: "direct main" + version: "1.3.1" + ffi: + dependency: transitive description: - name: firebase_core + name: ffi url: "https://pub.dartlang.org" source: hosted - version: "1.12.0" - firebase_core_platform_interface: + version: "2.0.1" + file: dependency: transitive description: - name: firebase_core_platform_interface + name: file url: "https://pub.dartlang.org" source: hosted - version: "4.2.4" - firebase_core_web: + version: "6.1.2" + fixnum: dependency: transitive description: - name: firebase_core_web + name: fixnum url: "https://pub.dartlang.org" source: hosted - version: "1.5.4" + version: "1.0.1" flutter: dependency: "direct main" description: flutter @@ -257,14 +327,14 @@ packages: name: flutter_bloc url: "https://pub.dartlang.org" source: hosted - version: "8.0.1" + version: "8.1.1" flutter_blurhash: dependency: transitive description: name: flutter_blurhash url: "https://pub.dartlang.org" source: hosted - version: "0.6.0" + version: "0.7.0" flutter_cache_manager: dependency: transitive description: @@ -272,13 +342,37 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "3.3.0" + flutter_driver: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_hooks: + dependency: transitive + description: + name: flutter_hooks + url: "https://pub.dartlang.org" + source: hosted + version: "0.18.5+1" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" + flutter_localizations: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" flutter_native_splash: dependency: "direct dev" description: name: flutter_native_splash url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "2.2.9" flutter_test: dependency: "direct dev" description: flutter @@ -295,147 +389,248 @@ packages: name: fluttertoast url: "https://pub.dartlang.org" source: hosted - version: "7.1.1" - freezed_annotation: + version: "8.0.9" + frontend_server_client: dependency: transitive description: - name: freezed_annotation + name: frontend_server_client url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "2.1.3" + fuchsia_remote_debug_protocol: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + glob: + dependency: transitive + description: + name: glob + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + go_router: + dependency: "direct main" + description: + name: go_router + url: "https://pub.dartlang.org" + source: hosted + version: "4.5.1" gql: dependency: transitive description: name: gql url: "https://pub.dartlang.org" source: hosted - version: "0.13.0" + version: "0.13.1" gql_dedupe_link: dependency: transitive description: name: gql_dedupe_link url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.2" gql_error_link: dependency: transitive description: name: gql_error_link url: "https://pub.dartlang.org" source: hosted - version: "0.2.0" + version: "0.2.2" gql_exec: dependency: transitive description: name: gql_exec url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" + version: "0.4.0" gql_http_link: dependency: transitive description: name: gql_http_link url: "https://pub.dartlang.org" source: hosted - version: "0.4.0" + version: "0.4.2" gql_link: dependency: transitive description: name: gql_link url: "https://pub.dartlang.org" source: hosted - version: "0.4.0" + version: "0.4.2" gql_transform_link: dependency: transitive description: name: gql_transform_link url: "https://pub.dartlang.org" source: hosted - version: "0.2.0" + version: "0.2.2" graphql: dependency: transitive description: name: graphql url: "https://pub.dartlang.org" source: hosted - version: "5.0.1-beta.6" + version: "5.1.1" graphql_flutter: - dependency: transitive + dependency: "direct main" description: name: graphql_flutter url: "https://pub.dartlang.org" source: hosted - version: "5.0.0" + version: "5.1.0" + graphs: + dependency: transitive + description: + name: graphs + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" hive: dependency: transitive description: name: hive url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" - http: + version: "2.2.3" + html: dependency: transitive + description: + name: html + url: "https://pub.dartlang.org" + source: hosted + version: "0.15.0" + http: + dependency: "direct main" description: name: http url: "https://pub.dartlang.org" source: hosted - version: "0.13.4" + version: "0.13.5" + http_interceptor: + dependency: "direct main" + description: + name: http_interceptor + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.1" http_parser: dependency: transitive description: name: http_parser url: "https://pub.dartlang.org" source: hosted - version: "4.0.0" + version: "4.0.1" image: dependency: transitive description: name: image url: "https://pub.dartlang.org" source: hosted - version: "3.1.1" + version: "3.2.0" + integration_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" intl: - dependency: transitive + dependency: "direct main" description: name: intl url: "https://pub.dartlang.org" source: hosted version: "0.17.0" + io: + dependency: transitive + description: + name: io + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" js: dependency: transitive description: name: js url: "https://pub.dartlang.org" source: hosted - version: "0.6.3" + version: "0.6.4" json_annotation: - dependency: transitive + dependency: "direct main" description: name: json_annotation url: "https://pub.dartlang.org" source: hosted - version: "4.4.0" + version: "4.6.0" + json_serializable: + dependency: "direct dev" + description: + name: json_serializable + url: "https://pub.dartlang.org" + source: hosted + version: "6.3.2" + lint: + dependency: transitive + description: + name: lint + url: "https://pub.dartlang.org" + source: hosted + version: "1.10.0" + lints: + dependency: transitive + description: + name: lints + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + logging: + dependency: transitive + description: + name: logging + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" matcher: dependency: transitive description: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.11" + version: "0.12.12" material_color_utilities: dependency: transitive description: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.3" + version: "0.1.5" meta: - dependency: "direct main" + dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" + mocktail: + dependency: "direct dev" + description: + name: mocktail + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.0" nested: dependency: transitive description: @@ -449,77 +644,91 @@ packages: name: nm url: "https://pub.dartlang.org" source: hosted - version: "0.4.3" + version: "0.5.0" + node_preamble: + dependency: transitive + description: + name: node_preamble + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" normalize: dependency: transitive description: name: normalize url: "https://pub.dartlang.org" source: hosted - version: "0.6.0" + version: "0.6.0+1" octo_image: dependency: transitive description: name: octo_image url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "1.0.2" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.2" path_provider: dependency: transitive description: name: path_provider url: "https://pub.dartlang.org" source: hosted - version: "2.0.8" + version: "2.0.11" path_provider_android: dependency: transitive description: name: path_provider_android url: "https://pub.dartlang.org" source: hosted - version: "2.0.11" + version: "2.0.20" path_provider_ios: dependency: transitive description: name: path_provider_ios url: "https://pub.dartlang.org" source: hosted - version: "2.0.7" + version: "2.0.11" path_provider_linux: dependency: transitive description: name: path_provider_linux url: "https://pub.dartlang.org" source: hosted - version: "2.1.5" + version: "2.1.7" path_provider_macos: dependency: transitive description: name: path_provider_macos url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.0.6" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.0.4" path_provider_windows: dependency: transitive description: name: path_provider_windows url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.1.3" pedantic: dependency: transitive description: @@ -533,7 +742,7 @@ packages: name: petitparser url: "https://pub.dartlang.org" source: hosted - version: "4.4.0" + version: "5.0.0" platform: dependency: transitive description: @@ -548,6 +757,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.2" + pool: + dependency: transitive + description: + name: pool + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.1" process: dependency: transitive description: @@ -556,108 +772,192 @@ packages: source: hosted version: "4.2.4" provider: - dependency: "direct main" + dependency: transitive description: name: provider url: "https://pub.dartlang.org" source: hosted - version: "6.0.2" - rxdart: + version: "6.0.3" + pub_semver: dependency: transitive description: - name: rxdart + name: pub_semver + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse url: "https://pub.dartlang.org" source: hosted - version: "0.27.3" - shared: + version: "1.2.1" + quiver: + dependency: transitive + description: + name: quiver + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.0" + retrofit: dependency: "direct main" description: - path: "../shared" - relative: true - source: path - version: "1.0.0+1" - shared_preferences: + name: retrofit + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1+1" + retrofit_generator: + dependency: "direct dev" + description: + name: retrofit_generator + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.3+2" + rxdart: dependency: transitive + description: + name: rxdart + url: "https://pub.dartlang.org" + source: hosted + version: "0.27.5" + shared_preferences: + dependency: "direct main" description: name: shared_preferences url: "https://pub.dartlang.org" source: hosted - version: "2.0.13" + version: "2.0.15" shared_preferences_android: dependency: transitive description: name: shared_preferences_android url: "https://pub.dartlang.org" source: hosted - version: "2.0.10" + version: "2.0.13" shared_preferences_ios: dependency: transitive description: name: shared_preferences_ios url: "https://pub.dartlang.org" source: hosted - version: "2.0.9" + version: "2.1.1" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux url: "https://pub.dartlang.org" source: hosted - version: "2.0.4" + version: "2.1.1" shared_preferences_macos: dependency: transitive description: name: shared_preferences_macos url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "2.0.4" shared_preferences_platform_interface: dependency: transitive description: name: shared_preferences_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0" shared_preferences_web: dependency: transitive description: name: shared_preferences_web url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.0.4" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows url: "https://pub.dartlang.org" source: hosted - version: "2.0.4" + version: "2.1.1" + shelf: + dependency: transitive + description: + name: shelf + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.2" + shelf_packages_handler: + dependency: transitive + description: + name: shelf_packages_handler + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1" + shelf_static: + dependency: transitive + description: + name: shelf_static + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.1" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" sky_engine: dependency: transitive description: flutter source: sdk version: "0.0.99" + source_gen: + dependency: transitive + description: + name: source_gen + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.3" + source_helper: + dependency: transitive + description: + name: source_helper + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.3" + source_map_stack_trace: + dependency: transitive + description: + name: source_map_stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + source_maps: + dependency: transitive + description: + name: source_maps + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.10" source_span: dependency: transitive description: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.9.0" sqflite: dependency: transitive description: name: sqflite url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "2.0.3+1" sqflite_common: dependency: transitive description: name: sqflite_common url: "https://pub.dartlang.org" source: hosted - version: "2.2.0" + version: "2.2.1+1" stack_trace: dependency: transitive description: @@ -672,41 +972,83 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" + stream_transform: + dependency: transitive + description: + name: stream_transform + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" + sync_http: + dependency: transitive + description: + name: sync_http + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.1" synchronized: dependency: transitive description: name: synchronized url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.0.0+3" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" + test: + dependency: transitive + description: + name: test + url: "https://pub.dartlang.org" + source: hosted + version: "1.21.4" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.8" + version: "0.4.12" + test_core: + dependency: transitive + description: + name: test_core + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.16" + timing: + dependency: transitive + description: + name: timing + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + tuple: + dependency: transitive + description: + name: tuple + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.3.1" universal_io: dependency: transitive description: @@ -720,77 +1062,77 @@ packages: name: uuid url: "https://pub.dartlang.org" source: hosted - version: "3.0.5" + version: "3.0.6" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" - web_socket_channel: + version: "2.1.2" + vm_service: dependency: transitive description: - name: web_socket_channel + name: vm_service url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" - webview_flutter: - dependency: "direct main" + version: "9.0.0" + watcher: + dependency: transitive description: - name: webview_flutter + name: watcher url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" - webview_flutter_android: + version: "1.0.1" + web_socket_channel: dependency: transitive description: - name: webview_flutter_android + name: web_socket_channel url: "https://pub.dartlang.org" source: hosted - version: "2.8.2" - webview_flutter_platform_interface: + version: "2.2.0" + webdriver: dependency: transitive description: - name: webview_flutter_platform_interface + name: webdriver url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" - webview_flutter_wkwebview: + version: "3.0.0" + webkit_inspection_protocol: dependency: transitive description: - name: webview_flutter_wkwebview + name: webkit_inspection_protocol url: "https://pub.dartlang.org" source: hosted - version: "2.7.1" + version: "1.2.0" win32: dependency: transitive description: name: win32 url: "https://pub.dartlang.org" source: hosted - version: "2.3.11" + version: "3.0.0" xdg_directories: dependency: transitive description: name: xdg_directories url: "https://pub.dartlang.org" source: hosted - version: "0.2.0+1" + version: "0.2.0+2" xml: dependency: transitive description: name: xml url: "https://pub.dartlang.org" source: hosted - version: "5.3.1" + version: "6.1.0" yaml: dependency: transitive description: name: yaml url: "https://pub.dartlang.org" source: hosted - version: "3.1.0" + version: "3.1.1" sdks: - dart: ">=2.15.1 <3.0.0" - flutter: ">=2.5.0" + dart: ">=2.18.0 <3.0.0" + flutter: ">=3.3.0" diff --git a/examples/book-store-firebase/app/pubspec.yaml b/pubspec.yaml similarity index 71% rename from examples/book-store-firebase/app/pubspec.yaml rename to pubspec.yaml index ba6b71d0..05ea4e4d 100644 --- a/examples/book-store-firebase/app/pubspec.yaml +++ b/pubspec.yaml @@ -1,9 +1,9 @@ -name: app +name: flutter_starter description: A new Flutter project. # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev +publish_to: "none" # Remove this line if you wish to publish to pub.dev # The following defines the version and build number for your application. # A version number is three numbers separated by dots, like 1.2.43 @@ -18,7 +18,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: ">=2.7.0 <3.0.0" + sdk: ">=2.17.1 <3.0.0" # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions @@ -29,39 +29,60 @@ environment: dependencies: flutter: sdk: flutter - - + flutter_localizations: + sdk: flutter + intl: ^0.17.0 # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.0 - provider: ^6.0.2 - cloud_firestore: ^3.1.10 - firebase_core: ^1.13.1 - get_it: ^7.2.0 - webview_flutter: ^3.0.1 - flutter_bloc: ^8.0.1 - meta: ^1.1.6 - bloc: ^8.0.3 + cupertino_icons: ^1.0.5 + flutter_bloc: ^8.1.1 equatable: ^2.0.3 fluttertoast: ^8.0.9 cached_network_image: ^3.2.0 - shared: - path: ../shared + http: + http_interceptor: ^1.0.2 + shared_preferences: ^2.0.12 + retrofit: ^3.0.1+1 + dio: ^4.0.6 + built_value: ^8.4.1 + json_annotation: ^4.6.0 + bloc: ^8.1.0 + go_router: ^4.4.1 + graphql_flutter: ^5.1.0 + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + dev_dependencies: flutter_test: sdk: flutter - flutter_native_splash: ^2.1.1 + integration_test: + sdk: flutter + flutter_native_splash: ^2.0.2 + retrofit_generator: ^4.0.3+1 + build_runner: ^2.2.0 + json_serializable: ^6.3.1 + built_value_generator: ^8.4.1 + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^2.0.0 + bloc_test: ^9.1.0 + mocktail: ^0.3.0 flutter_native_splash: image: assets/images/logo.png color: "5E92F3" android_disable_fullscreen: true + # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec -# The following section is specific to Flutter. +# The following section is specific to Flutter packages. flutter: - + generate: true # The following line ensures that the Material Icons font is # included with your application, so that you can use the icons in # the material Icons class. @@ -69,15 +90,14 @@ flutter: # To add assets to your application, add an assets section, like this: assets: - - assets/ - - assets/books/ - assets/images/logo.png - assets/images/2.0x/logo.png - assets/images/3.0x/logo.png - # - images/a_dot_ham.jpeg + - assets/images/login.png + - assets/images/signup.png # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware. + # https://flutter.dev/assets-and-images/#resolution-aware # For details regarding adding assets from package dependencies, see # https://flutter.dev/assets-and-images/#from-packages @@ -101,4 +121,3 @@ flutter: # # For details regarding fonts from package dependencies, # see https://flutter.dev/custom-fonts/#from-packages - diff --git a/run_script.sh b/run_script.sh deleted file mode 100644 index 9f269a83..00000000 --- a/run_script.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -cd api_sdk -echo "+++++API SDK pub clean+++++" -flutter clean -echo "+++++API SDK pub get+++++" -flutter pub get -echo "+++++API SDK done+++++" - - -cd ../shared -echo "+++++Shared pub clean+++++" -flutter clean -echo "+++++Shared pub get+++++" -flutter pub get -echo "+++++Shared done+++++" - -cd ../app -echo "+++++Main app pub clean+++++" -flutter clean -echo "+++++Main app pub get+++++" -flutter pub get -echo "+++++Main app run+++++" -flutter run \ No newline at end of file diff --git a/shared/.gitignore b/shared/.gitignore deleted file mode 100644 index 9d532b18..00000000 --- a/shared/.gitignore +++ /dev/null @@ -1,41 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json diff --git a/shared/.metadata b/shared/.metadata deleted file mode 100644 index 107fcb7b..00000000 --- a/shared/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 8874f21e79d7ec66d0457c7ab338348e31b17f1d - channel: stable - -project_type: app diff --git a/shared/README.md b/shared/README.md deleted file mode 100644 index 25946365..00000000 --- a/shared/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# shared - -A new Flutter project. - -## Getting Started - -This project is a starting point for a Flutter application. - -A few resources to get you started if this is your first Flutter project: - -- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) - -For help getting started with Flutter, view our -[online documentation](https://flutter.dev/docs), which offers tutorials, -samples, guidance on mobile development, and a full API reference. diff --git a/shared/lib/main.dart b/shared/lib/main.dart deleted file mode 100644 index 4e63e406..00000000 --- a/shared/lib/main.dart +++ /dev/null @@ -1,5 +0,0 @@ -export 'package:shared/modules/authentication/auth.dart'; -export 'package:shared/modules/authentication/bloc/bloc_controller.dart'; -import 'package:shared_preferences/shared_preferences.dart'; - -Future prefs = SharedPreferences.getInstance(); diff --git a/shared/lib/modules/authentication/auth.dart b/shared/lib/modules/authentication/auth.dart deleted file mode 100644 index 662c0eb7..00000000 --- a/shared/lib/modules/authentication/auth.dart +++ /dev/null @@ -1,4 +0,0 @@ -export 'package:shared/modules/authentication/bloc/authentication/authentication_bloc_public.dart'; -export 'package:shared/modules/authentication/models/auth_models_public.dart'; -export 'package:shared/modules/authentication/models/firebase_user.dart'; -export 'package:shared/modules/authentication/resources/authentication_repository.dart'; diff --git a/shared/lib/modules/authentication/bloc/authentication/authentication_bloc.dart b/shared/lib/modules/authentication/bloc/authentication/authentication_bloc.dart deleted file mode 100644 index 028c91f7..00000000 --- a/shared/lib/modules/authentication/bloc/authentication/authentication_bloc.dart +++ /dev/null @@ -1,95 +0,0 @@ -import 'package:bloc/bloc.dart'; -import 'package:shared/main.dart'; -import 'package:shared_preferences/shared_preferences.dart'; - -class AuthenticationBloc - extends Bloc { - final AuthenticationRepository authenticationService = - AuthenticationRepository(); - AuthenticationBloc() : super(AuthenticationInitial()) { - on(_mapAppSignUpLoadedState); - on(_mapUserSignupToState); - on(_mapUserLoginState); - on((event, emit) async { - final SharedPreferences sharedPreferences = await prefs; - sharedPreferences.clear(); - emit(UserLogoutState()); - }); - on((event, emit) async { - final SharedPreferences sharedPreferences = await prefs; - int currentUserId = sharedPreferences.getInt('userId'); - final data = await authenticationService.getUserData(currentUserId ?? 4); - final currentUserData = CurrentUserData.fromJson(data); - emit(SetUserData(currentUserData: currentUserData)); - }); - } - - void _mapAppSignUpLoadedState( - AppLoadedup event, Emitter emit) async { - AuthenticationLoading(); - try { - await Future.delayed(Duration(milliseconds: 500)); // a simulated delay - final SharedPreferences sharedPreferences = await prefs; - if (sharedPreferences.getString('authtoken') != null) { - emit(AppAutheticated()); - } else { - emit(AuthenticationStart()); - } - } catch (e) { - emit(AuthenticationFailure( - message: e.message ?? 'An unknown error occurred')); - } - } - - void _mapUserLoginState( - UserLogin event, Emitter emit) async { - final SharedPreferences sharedPreferences = await prefs; - emit(AuthenticationLoading()); - try { - await Future.delayed(Duration(milliseconds: 500)); // a simulated delay - final data = await authenticationService.loginWithEmailAndPassword( - event.email, event.password); - if (data["error"] == null) { - final currentUser = Token.fromJson(data); - if (currentUser != null) { - sharedPreferences.setString('authtoken', currentUser.token); - emit(AppAutheticated()); - } else { - emit(AuthenticationNotAuthenticated()); - } - } else { - emit(AuthenticationFailure(message: data["error"])); - } - } catch (e) { - emit(AuthenticationFailure( - message: e.toString() ?? 'An unknown error occurred')); - } - } - - void _mapUserSignupToState( - UserSignUp event, Emitter emit) async { - final SharedPreferences sharedPreferences = await prefs; - emit(AuthenticationLoading()); - try { - await Future.delayed(Duration(milliseconds: 500)); // a simulated delay - final data = await authenticationService.signUpWithEmailAndPassword( - event.email, event.password); - - if (data["error"] == null) { - final currentUser = UserData.fromJson(data); - if (currentUser != null) { - sharedPreferences.setString('authtoken', currentUser.token); - sharedPreferences.setInt('userId', currentUser.id); - emit(AppAutheticated()); - } else { - emit(AuthenticationNotAuthenticated()); - } - } else { - emit(AuthenticationFailure(message: data["error"])); - } - } catch (e) { - emit(AuthenticationFailure( - message: e.toString() ?? 'An unknown error occurred')); - } - } -} diff --git a/shared/lib/modules/authentication/bloc/authentication/authentication_bloc_public.dart b/shared/lib/modules/authentication/bloc/authentication/authentication_bloc_public.dart deleted file mode 100644 index 4ebb9f73..00000000 --- a/shared/lib/modules/authentication/bloc/authentication/authentication_bloc_public.dart +++ /dev/null @@ -1,3 +0,0 @@ -export 'package:shared/modules/authentication/bloc/authentication/authentication_bloc.dart'; -export 'package:shared/modules/authentication/bloc/authentication/authentication_event.dart'; -export 'package:shared/modules/authentication/bloc/authentication/authentication_state.dart'; diff --git a/shared/lib/modules/authentication/bloc/authentication/authentication_event.dart b/shared/lib/modules/authentication/bloc/authentication/authentication_event.dart deleted file mode 100644 index d6f7a93f..00000000 --- a/shared/lib/modules/authentication/bloc/authentication/authentication_event.dart +++ /dev/null @@ -1,34 +0,0 @@ -import 'package:meta/meta.dart'; -import 'package:equatable/equatable.dart'; - -abstract class AuthenticationEvent extends Equatable { - const AuthenticationEvent(); - - @override - List get props => []; -} - -// Fired just after the app is launched -class AppLoadedup extends AuthenticationEvent {} - -class UserLogOut extends AuthenticationEvent {} - -class GetUserData extends AuthenticationEvent {} - -class UserSignUp extends AuthenticationEvent { - final String email; - final String password; - UserSignUp({@required this.email, this.password}); - - @override - List get props => [email, password]; -} - -class UserLogin extends AuthenticationEvent { - final String email; - final String password; - UserLogin({@required this.email, this.password}); - - @override - List get props => [email, password]; -} diff --git a/shared/lib/modules/authentication/bloc/authentication/authentication_state.dart b/shared/lib/modules/authentication/bloc/authentication/authentication_state.dart deleted file mode 100644 index 627616d0..00000000 --- a/shared/lib/modules/authentication/bloc/authentication/authentication_state.dart +++ /dev/null @@ -1,38 +0,0 @@ -import 'package:meta/meta.dart'; -import 'package:equatable/equatable.dart'; -import 'package:shared/modules/authentication/models/current_user_data.dart'; - -abstract class AuthenticationState extends Equatable { - const AuthenticationState(); - - @override - List get props => []; -} - -class AppAutheticated extends AuthenticationState {} - -class AuthenticationInitial extends AuthenticationState {} - -class AuthenticationLoading extends AuthenticationState {} - -class AuthenticationStart extends AuthenticationState {} - -class UserLogoutState extends AuthenticationState {} - -class SetUserData extends AuthenticationState { - final CurrentUserData currentUserData; - SetUserData({this.currentUserData}); - @override - List get props => [currentUserData]; -} - -class AuthenticationNotAuthenticated extends AuthenticationState {} - -class AuthenticationFailure extends AuthenticationState { - final String message; - - AuthenticationFailure({@required this.message}); - - @override - List get props => [message]; -} diff --git a/shared/lib/modules/authentication/bloc/bloc_controller.dart b/shared/lib/modules/authentication/bloc/bloc_controller.dart deleted file mode 100644 index f5cadbc3..00000000 --- a/shared/lib/modules/authentication/bloc/bloc_controller.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'package:shared/main.dart'; - -class AuthenticationBlocController { - AuthenticationBlocController._(); - static AuthenticationBlocController _instance = - AuthenticationBlocController._(); - factory AuthenticationBlocController() => _instance; - - // ignore: close_sinks - AuthenticationBloc authenticationBloc = AuthenticationBloc(); -} diff --git a/shared/lib/modules/authentication/models/auth_models_public.dart b/shared/lib/modules/authentication/models/auth_models_public.dart deleted file mode 100644 index 040c2e1b..00000000 --- a/shared/lib/modules/authentication/models/auth_models_public.dart +++ /dev/null @@ -1,4 +0,0 @@ -export 'package:shared/modules/authentication/models/token.dart'; -export 'package:shared/modules/authentication/models/user.dart'; -export 'package:shared/modules/authentication/models/user_data.dart'; -export 'package:shared/modules/authentication/models/current_user_data.dart'; diff --git a/shared/lib/modules/authentication/models/current_user_data.dart b/shared/lib/modules/authentication/models/current_user_data.dart deleted file mode 100644 index b4f7fdb6..00000000 --- a/shared/lib/modules/authentication/models/current_user_data.dart +++ /dev/null @@ -1,77 +0,0 @@ -class CurrentUserData { - Data data; - Ad ad; - - CurrentUserData({this.data, this.ad}); - - CurrentUserData.fromJson(Map json) { - data = json['data'] != null ? new Data.fromJson(json['data']) : Data(); - ad = json['ad'] != null ? new Ad.fromJson(json['ad']) : Ad(); - } - - Map toJson() { - final Map data = new Map(); - if (this.data != null) { - data['data'] = this.data.toJson(); - } - if (this.ad != null) { - data['ad'] = this.ad.toJson(); - } - return data; - } -} - -class Data { - int id; - String email; - String firstName; - String lastName; - String avatar; - - Data( - {this.id, - this.email = '', - this.firstName = '', - this.lastName = '', - this.avatar = ''}); - - Data.fromJson(Map json) { - id = json['id']; - email = json['email']; - firstName = json['first_name']; - lastName = json['last_name']; - avatar = json['avatar']; - } - - Map toJson() { - final Map data = new Map(); - data['id'] = this.id; - data['email'] = this.email; - data['first_name'] = this.firstName; - data['last_name'] = this.lastName; - data['avatar'] = this.avatar; - return data; - } -} - -class Ad { - String company; - String url; - String text; - - Ad({this.company = '', this.url = '', this.text = ''}); - - Ad.fromJson(Map json) { - company = json['company']; - url = json['url']; - text = json['text']; - } - - Map toJson() { - final Map data = new Map(); - data['company'] = this.company; - data['url'] = this.url; - data['text'] = this.text; - return data; - } -} diff --git a/shared/lib/modules/authentication/models/firebase_user.dart b/shared/lib/modules/authentication/models/firebase_user.dart deleted file mode 100644 index 21d507ca..00000000 --- a/shared/lib/modules/authentication/models/firebase_user.dart +++ /dev/null @@ -1,14 +0,0 @@ -class UserFromFirebaseUser { - final String uid; - final String email; - final String token; - final String avatar; - - UserFromFirebaseUser({ - this.uid, - this.email, - this.token, - this.avatar = - "https://i.pinimg.com/736x/89/90/48/899048ab0cc455154006fdb9676964b3.jpg", - }); -} diff --git a/shared/lib/modules/authentication/models/token.dart b/shared/lib/modules/authentication/models/token.dart deleted file mode 100644 index 41f1f92a..00000000 --- a/shared/lib/modules/authentication/models/token.dart +++ /dev/null @@ -1,15 +0,0 @@ -class Token { - String token; - - Token({this.token}); - - Token.fromJson(Map json) { - token = json['token']; - } - - Map toJson() { - final Map data = new Map(); - data['token'] = this.token; - return data; - } -} diff --git a/shared/lib/modules/authentication/models/user_data.dart b/shared/lib/modules/authentication/models/user_data.dart deleted file mode 100644 index 1ef23e6c..00000000 --- a/shared/lib/modules/authentication/models/user_data.dart +++ /dev/null @@ -1,18 +0,0 @@ -class UserData { - int id; - String token; - - UserData({this.id, this.token}); - - UserData.fromJson(Map json) { - id = json['id']; - token = json['token']; - } - - Map toJson() { - final Map data = new Map(); - data['id'] = this.id; - data['token'] = this.token; - return data; - } -} diff --git a/shared/pubspec.lock b/shared/pubspec.lock deleted file mode 100644 index 5c68e5c0..00000000 --- a/shared/pubspec.lock +++ /dev/null @@ -1,670 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - api_sdk: - dependency: "direct main" - description: - path: "../api_sdk" - relative: true - source: path - version: "1.0.0+1" - args: - dependency: transitive - description: - name: args - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.0" - async: - dependency: transitive - description: - name: async - url: "https://pub.dartlang.org" - source: hosted - version: "2.8.2" - bloc: - dependency: "direct main" - description: - name: bloc - url: "https://pub.dartlang.org" - source: hosted - version: "8.0.2" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - characters: - dependency: transitive - description: - name: characters - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - clock: - dependency: transitive - description: - name: clock - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - cloud_firestore: - dependency: transitive - description: - name: cloud_firestore - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.7" - cloud_firestore_platform_interface: - dependency: transitive - description: - name: cloud_firestore_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "5.4.12" - cloud_firestore_web: - dependency: transitive - description: - name: cloud_firestore_web - url: "https://pub.dartlang.org" - source: hosted - version: "2.6.7" - collection: - dependency: transitive - description: - name: collection - url: "https://pub.dartlang.org" - source: hosted - version: "1.15.0" - connectivity_plus: - dependency: transitive - description: - name: connectivity_plus - url: "https://pub.dartlang.org" - source: hosted - version: "1.4.0" - connectivity_plus_linux: - dependency: transitive - description: - name: connectivity_plus_linux - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_macos: - dependency: transitive - description: - name: connectivity_plus_macos - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.1" - connectivity_plus_platform_interface: - dependency: transitive - description: - name: connectivity_plus_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_web: - dependency: transitive - description: - name: connectivity_plus_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_windows: - dependency: transitive - description: - name: connectivity_plus_windows - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - crypto: - dependency: transitive - description: - name: crypto - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - dbus: - dependency: transitive - description: - name: dbus - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.8" - equatable: - dependency: "direct main" - description: - name: equatable - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - fake_async: - dependency: transitive - description: - name: fake_async - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - ffi: - dependency: transitive - description: - name: ffi - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.2" - file: - dependency: transitive - description: - name: file - url: "https://pub.dartlang.org" - source: hosted - version: "6.1.2" - firebase_auth: - dependency: transitive - description: - name: firebase_auth - url: "https://pub.dartlang.org" - source: hosted - version: "3.3.6" - firebase_auth_platform_interface: - dependency: transitive - description: - name: firebase_auth_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "6.1.11" - firebase_auth_web: - dependency: transitive - description: - name: firebase_auth_web - url: "https://pub.dartlang.org" - source: hosted - version: "3.3.7" - firebase_core: - dependency: transitive - description: - name: firebase_core - url: "https://pub.dartlang.org" - source: hosted - version: "1.12.0" - firebase_core_platform_interface: - dependency: transitive - description: - name: firebase_core_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "4.2.4" - firebase_core_web: - dependency: transitive - description: - name: firebase_core_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.5.4" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_bloc: - dependency: "direct main" - description: - name: flutter_bloc - url: "https://pub.dartlang.org" - source: hosted - version: "8.0.1" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - freezed_annotation: - dependency: transitive - description: - name: freezed_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - gql: - dependency: transitive - description: - name: gql - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.0" - gql_dedupe_link: - dependency: transitive - description: - name: gql_dedupe_link - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - gql_error_link: - dependency: transitive - description: - name: gql_error_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - gql_exec: - dependency: transitive - description: - name: gql_exec - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.0" - gql_http_link: - dependency: transitive - description: - name: gql_http_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.0" - gql_link: - dependency: transitive - description: - name: gql_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.0" - gql_transform_link: - dependency: transitive - description: - name: gql_transform_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" - graphql: - dependency: transitive - description: - name: graphql - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.1-beta.6" - graphql_flutter: - dependency: transitive - description: - name: graphql_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.0" - hive: - dependency: transitive - description: - name: hive - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - http: - dependency: transitive - description: - name: http - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.4" - http_parser: - dependency: transitive - description: - name: http_parser - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.0" - intl: - dependency: transitive - description: - name: intl - url: "https://pub.dartlang.org" - source: hosted - version: "0.17.0" - js: - dependency: transitive - description: - name: js - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.3" - json_annotation: - dependency: transitive - description: - name: json_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "4.4.0" - matcher: - dependency: transitive - description: - name: matcher - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.11" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.3" - meta: - dependency: transitive - description: - name: meta - url: "https://pub.dartlang.org" - source: hosted - version: "1.7.0" - nested: - dependency: transitive - description: - name: nested - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - nm: - dependency: transitive - description: - name: nm - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.3" - normalize: - dependency: transitive - description: - name: normalize - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.0" - path: - dependency: transitive - description: - name: path - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0" - path_provider: - dependency: "direct main" - description: - name: path_provider - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.8" - path_provider_android: - dependency: transitive - description: - name: path_provider_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.11" - path_provider_ios: - dependency: transitive - description: - name: path_provider_ios - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.7" - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.5" - path_provider_macos: - dependency: transitive - description: - name: path_provider_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - petitparser: - dependency: transitive - description: - name: petitparser - url: "https://pub.dartlang.org" - source: hosted - version: "4.4.0" - platform: - dependency: transitive - description: - name: platform - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.2" - process: - dependency: transitive - description: - name: process - url: "https://pub.dartlang.org" - source: hosted - version: "4.2.4" - provider: - dependency: transitive - description: - name: provider - url: "https://pub.dartlang.org" - source: hosted - version: "6.0.2" - rxdart: - dependency: "direct main" - description: - name: rxdart - url: "https://pub.dartlang.org" - source: hosted - version: "0.27.3" - shared_preferences: - dependency: "direct main" - description: - name: shared_preferences - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.13" - shared_preferences_android: - dependency: transitive - description: - name: shared_preferences_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.10" - shared_preferences_ios: - dependency: transitive - description: - name: shared_preferences_ios - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.9" - shared_preferences_linux: - dependency: transitive - description: - name: shared_preferences_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.4" - shared_preferences_macos: - dependency: transitive - description: - name: shared_preferences_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.2" - shared_preferences_platform_interface: - dependency: transitive - description: - name: shared_preferences_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - shared_preferences_web: - dependency: transitive - description: - name: shared_preferences_web - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" - shared_preferences_windows: - dependency: transitive - description: - name: shared_preferences_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.4" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_span: - dependency: transitive - description: - name: source_span - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.1" - sqflite: - dependency: "direct main" - description: - name: sqflite - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.2" - sqflite_common: - dependency: transitive - description: - name: sqflite_common - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.0" - stack_trace: - dependency: transitive - description: - name: stack_trace - url: "https://pub.dartlang.org" - source: hosted - version: "1.10.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - synchronized: - dependency: transitive - description: - name: synchronized - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - test_api: - dependency: transitive - description: - name: test_api - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.8" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - uuid: - dependency: transitive - description: - name: uuid - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.5" - vector_math: - dependency: transitive - description: - name: vector_math - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - win32: - dependency: transitive - description: - name: win32 - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.11" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0+1" - xml: - dependency: transitive - description: - name: xml - url: "https://pub.dartlang.org" - source: hosted - version: "5.3.1" -sdks: - dart: ">=2.15.0 <3.0.0" - flutter: ">=2.5.0" diff --git a/shared/pubspec.yaml b/shared/pubspec.yaml deleted file mode 100644 index 38ad2738..00000000 --- a/shared/pubspec.yaml +++ /dev/null @@ -1,84 +0,0 @@ -name: shared -description: A new Flutter project. - -# The following line prevents the package from being accidentally published to -# pub.dev using `pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev - -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.0+1 - -environment: - sdk: ">=2.7.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.0 - sqflite: ^2.0.2 - path_provider: ^2.0.8 - rxdart: ^0.27.3 - bloc: ^8.0.2 - flutter_bloc: ^8.0.1 - equatable: ^2.0.3 - shared_preferences: ^2.0.12 - api_sdk: - path: ../api_sdk -dev_dependencies: - flutter_test: - sdk: flutter - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter. -flutter: - - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. - uses-material-design: true - - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware. - - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/assets-and-images/#from-packages - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/custom-fonts/#from-packages diff --git a/shared/test/widget_test.dart b/shared/test/widget_test.dart deleted file mode 100644 index 570e0e47..00000000 --- a/shared/test/widget_test.dart +++ /dev/null @@ -1,8 +0,0 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility that Flutter provides. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - -void main() {} diff --git a/test/bloc/authentication/authentication_bloc_test.dart b/test/bloc/authentication/authentication_bloc_test.dart new file mode 100644 index 00000000..54935812 --- /dev/null +++ b/test/bloc/authentication/authentication_bloc_test.dart @@ -0,0 +1,166 @@ +import 'package:bloc_test/bloc_test.dart'; +import 'package:flutter_starter/common_export.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:shared_preferences/shared_preferences.dart'; +import 'package:mocktail/mocktail.dart'; + +class MockAuthenticationRepository extends Mock + implements AuthenticationRepository {} + +void main() { + group('AuthenticationBloc', () { + late AuthenticationBloc authenticationBloc; + late AuthenticationRepository authenticationService; + late SharedPrefs prefs; + + setUp(() async { + SharedPreferences.setMockInitialValues({}); + prefs = SharedPrefs.instance; + await prefs.init(); + authenticationService = MockAuthenticationRepository(); + authenticationBloc = AuthenticationBloc( + authenticationService: authenticationService, + ); + }); + + tearDown(() { + authenticationBloc.close(); + prefs.clear(); + }); + + blocTest( + 'test initial state of the bloc', + build: () => authenticationBloc, + verify: (bloc) => bloc.state == const AuthenticationInitial(), + ); + + blocTest( + 'when auth token is null', + build: () { + prefs.remove('authtoken'); + return authenticationBloc; + }, + act: (bloc) => bloc.add(const AppLoadedup()), + wait: const Duration(milliseconds: 500), + expect: () { + return [ + const AuthenticationLoading(), + const AuthenticationStart(), + ]; + }, + ); + + blocTest( + 'when auth token is not null', + build: () { + prefs.setToken('authtoken'); + return authenticationBloc; + }, + act: (bloc) => bloc.add(const AppLoadedup()), + wait: const Duration(milliseconds: 500), + expect: () { + return [ + const AuthenticationLoading(), + const AppAutheticated(), + ]; + }, + ); + + blocTest( + 'when user signup failed', + build: () { + when(() => authenticationService.signUpWithEmailAndPassword( + 'test@gmail.in', 'test1234')).thenAnswer( + (invocation) => Future.value({'error': 'already registered'}), + ); + return authenticationBloc; + }, + act: (bloc) => bloc.add( + const UserSignUp(email: 'test@gmail.in', password: 'test1234'), + ), + wait: const Duration(milliseconds: 500), + expect: () { + return [ + const AuthenticationLoading(), + const AuthenticationFailure(message: 'already registered'), + ]; + }, + ); + + blocTest( + 'when user signup success', + build: () { + when(() => authenticationService.signUpWithEmailAndPassword( + 'eve.holt@reqres.in', 'cityslicka')).thenAnswer( + (invocation) => Future.value({'id': 1, 'token': 'abc'}), + ); + return authenticationBloc; + }, + act: (bloc) => bloc.add( + const UserSignUp(email: 'eve.holt@reqres.in', password: 'cityslicka'), + ), + wait: const Duration(milliseconds: 500), + expect: () { + return [ + const AuthenticationLoading(), + const AppAutheticated(), + ]; + }, + ); + + blocTest( + 'when user login failed', + build: () { + when(() => authenticationService.loginWithEmailAndPassword( + 'test@gmail.in', 'test1234')).thenAnswer( + (invocation) => Future.value({'error': 'user not found'}), + ); + return authenticationBloc; + }, + act: (bloc) => bloc.add( + const UserLogin(email: 'test@gmail.in', password: 'test1234'), + ), + wait: const Duration(milliseconds: 500), + expect: () { + return [ + const AuthenticationLoading(), + const AuthenticationFailure(message: 'user not found'), + ]; + }, + ); + + blocTest( + 'when user login success', + build: () { + when(() => authenticationService.loginWithEmailAndPassword( + 'eve.holt@reqres.in', 'cityslicka')).thenAnswer( + (invocation) => Future.value({'token': 'abc'}), + ); + return authenticationBloc; + }, + act: (bloc) => bloc.add( + const UserLogin(email: 'eve.holt@reqres.in', password: 'cityslicka'), + ), + wait: const Duration(milliseconds: 500), + expect: () { + return [ + const AuthenticationLoading(), + const AppAutheticated(), + ]; + }, + ); + + blocTest( + 'when user logout', + build: () => authenticationBloc, + act: (bloc) => bloc.add(const UserLogOut()), + wait: const Duration(milliseconds: 500), + expect: () { + return [ + const AuthenticationLoading(), + const UserLogoutState(), + ]; + }, + ); + }); +} diff --git a/test/bloc/authentication/authentication_event_test.dart b/test/bloc/authentication/authentication_event_test.dart new file mode 100644 index 00000000..86a1aee7 --- /dev/null +++ b/test/bloc/authentication/authentication_event_test.dart @@ -0,0 +1,29 @@ +// ignore_for_file: prefer_const_constructors + +import 'package:flutter_starter/common_export.dart'; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + group('AuthenticationEvent', () { + test('test value comparisons of loading event', () { + expect( + AppLoadedup(), + AppLoadedup(), + ); + }); + + test('test value comparisons of user data event', () { + expect( + GetUserData(), + GetUserData(), + ); + }); + + test('test value comparisons of logout event', () { + expect( + UserLogOut(), + UserLogOut(), + ); + }); + }); +} diff --git a/test/bloc/authentication/authentication_state_test.dart b/test/bloc/authentication/authentication_state_test.dart new file mode 100644 index 00000000..c42e0714 --- /dev/null +++ b/test/bloc/authentication/authentication_state_test.dart @@ -0,0 +1,29 @@ +// ignore_for_file: prefer_const_constructors + +import 'package:flutter_starter/common_export.dart'; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + group('AuthenticationState', () { + test('test value comparisons of loading state', () { + expect( + AuthenticationLoading(), + AuthenticationLoading(), + ); + }); + + test('test value comparisons of authenticated state', () { + expect( + AppAutheticated(), + AppAutheticated(), + ); + }); + + test('test value comparisons of logout state', () { + expect( + UserLogoutState(), + UserLogoutState(), + ); + }); + }); +} diff --git a/test/bloc/update_theme/update_theme_bloc_test.dart b/test/bloc/update_theme/update_theme_bloc_test.dart new file mode 100644 index 00000000..7c9e94d2 --- /dev/null +++ b/test/bloc/update_theme/update_theme_bloc_test.dart @@ -0,0 +1,30 @@ +import 'package:bloc_test/bloc_test.dart'; +import 'package:flutter_starter/common_export.dart'; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + group('UpdateThemeBloc', () { + late UpdateThemeBloc updateThemeBloc; + + setUp(() async { + updateThemeBloc = UpdateThemeBloc(); + }); + + tearDown(() { + updateThemeBloc.close(); + }); + + blocTest( + 'test initial state of the theme bloc', + build: () => updateThemeBloc, + verify: (bloc) => bloc.state == const SetTheme(appTheme: AppTheme.light), + ); + + blocTest( + 'test when theme is changed', + build: () => updateThemeBloc, + act: (bloc) => bloc.add(const UpdateTheme(appTheme: AppTheme.dark)), + expect: () => [const SetTheme(appTheme: AppTheme.dark)], + ); + }); +} diff --git a/test/bloc/update_theme/update_theme_event_test.dart b/test/bloc/update_theme/update_theme_event_test.dart new file mode 100644 index 00000000..0b37fdb9 --- /dev/null +++ b/test/bloc/update_theme/update_theme_event_test.dart @@ -0,0 +1,22 @@ +// ignore_for_file: prefer_const_constructors + +import 'package:flutter_starter/common_export.dart'; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + group('UpdateTheme', () { + test('test value comparisons during light theme', () { + expect( + UpdateTheme(appTheme: AppTheme.light), + UpdateTheme(appTheme: AppTheme.light), + ); + }); + + test('test value comparisons during dark theme', () { + expect( + UpdateTheme(appTheme: AppTheme.dark), + UpdateTheme(appTheme: AppTheme.dark), + ); + }); + }); +} diff --git a/test/bloc/update_theme/update_theme_state_test.dart b/test/bloc/update_theme/update_theme_state_test.dart new file mode 100644 index 00000000..6fde6dde --- /dev/null +++ b/test/bloc/update_theme/update_theme_state_test.dart @@ -0,0 +1,22 @@ +// ignore_for_file: prefer_const_constructors + +import 'package:flutter_starter/common_export.dart'; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + group('SetTheme', () { + test('test value comparisons during light theme', () { + expect( + SetTheme(appTheme: AppTheme.light), + SetTheme(appTheme: AppTheme.light), + ); + }); + + test('test value comparisons during dark theme', () { + expect( + SetTheme(appTheme: AppTheme.dark), + SetTheme(appTheme: AppTheme.dark), + ); + }); + }); +} diff --git a/test/screens/home/logout_test.dart b/test/screens/home/logout_test.dart new file mode 100644 index 00000000..dd857d3f --- /dev/null +++ b/test/screens/home/logout_test.dart @@ -0,0 +1,67 @@ +import 'package:bloc_test/bloc_test.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_starter/common_export.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:mocktail/mocktail.dart'; + +class MockAuthenticationBloc + extends MockBloc + implements AuthenticationBloc {} + +class MockUpdateThemeBloc extends MockBloc + implements UpdateThemeBloc {} + +void main() { + late AuthenticationBloc authenticationBloc; + late UpdateThemeBloc updateThemeBloc; + + setUp(() async { + authenticationBloc = MockAuthenticationBloc(); + updateThemeBloc = MockUpdateThemeBloc(); + }); + + tearDown(() { + authenticationBloc.close(); + updateThemeBloc.close(); + }); + + Widget createWidget(Widget child) { + return MaterialApp( + home: Builder(builder: (context) { + UiSizeConfig().init(context); + return MultiBlocProvider( + providers: [ + BlocProvider.value(value: authenticationBloc), + BlocProvider.value(value: updateThemeBloc), + ], + child: child, + ); + }), + ); + } + + group('Authentication check', () { + testWidgets('when user logout', (WidgetTester tester) async { + when(() => authenticationBloc.state).thenReturn( + SetUserData( + currentUserData: CurrentUserData( + data: + Data(id: 0, email: '', firstName: '', lastName: '', avatar: ''), + support: Support(url: '', text: ''), + ), + ), + ); + when(() => updateThemeBloc.state).thenReturn( + const SetTheme(appTheme: AppTheme.light), + ); + + await tester.pumpWidget(createWidget(const HomeScreen())); + final Finder logout = find.byKey(const Key('logoutButton')); + await tester.tap(logout); + await tester.pump(); + + verify(() => authenticationBloc.add(const UserLogOut())).called(1); + }); + }); +} diff --git a/test/screens/login/login_test.dart b/test/screens/login/login_test.dart new file mode 100644 index 00000000..ff884b1a --- /dev/null +++ b/test/screens/login/login_test.dart @@ -0,0 +1,84 @@ +import 'package:bloc_test/bloc_test.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_starter/common_export.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:mocktail/mocktail.dart'; + +class MockAuthenticationBloc + extends MockBloc + implements AuthenticationBloc {} + +void main() { + late AuthenticationBloc authenticationBloc; + + setUp(() async { + authenticationBloc = MockAuthenticationBloc(); + }); + + tearDown(() { + authenticationBloc.close(); + }); + + Widget createWidget(Widget child) { + return MaterialApp( + home: Builder(builder: (context) { + UiSizeConfig().init(context); + return BlocProvider.value( + value: authenticationBloc, + child: child, + ); + }), + ); + } + + group('Login test', () { + testWidgets('when invalid credentials are provided', + (WidgetTester tester) async { + await tester.runAsync(() async { + const emailText = ''; + const passwordText = ''; + + when(() => authenticationBloc.state) + .thenReturn(const AuthenticationInitial()); + + await tester.pumpWidget(createWidget(const LoginScreen())); + final Finder email = find.byKey(const Key('emailField')); + await tester.enterText(email, emailText); + final Finder password = find.byKey(const Key('passwordField')); + await tester.enterText(password, passwordText); + final Finder login = find.byKey(const Key('loginButton')); + await tester.tap(login); + await tester.pump(); + + verifyNever(() => authenticationBloc.add( + const UserLogin(email: emailText, password: passwordText), + )); + }); + }); + + testWidgets('when valid credentials are provided', + (WidgetTester tester) async { + await tester.runAsync(() async { + const emailText = 'eve.holt@reqres.in'; + const passwordText = 'cityslicka'; + + when(() => authenticationBloc.state) + .thenReturn(const AuthenticationInitial()); + + await tester.pumpWidget(createWidget(const LoginScreen())); + final Finder email = find.byKey(const Key('emailField')); + await tester.enterText(email, emailText); + final Finder password = find.byKey(const Key('passwordField')); + await tester.enterText(password, passwordText); + final Finder login = find.byKey(const Key('loginButton')); + await tester.tap(login); + await tester.pump(); + + verify(() => authenticationBloc.add( + const UserLogin(email: emailText, password: passwordText), + )).called(1); + }); + }); + }); +} diff --git a/test/screens/signup/signup_test.dart b/test/screens/signup/signup_test.dart new file mode 100644 index 00000000..7125e0c5 --- /dev/null +++ b/test/screens/signup/signup_test.dart @@ -0,0 +1,90 @@ +import 'package:bloc_test/bloc_test.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_starter/common_export.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:mocktail/mocktail.dart'; + +class MockAuthenticationBloc + extends MockBloc + implements AuthenticationBloc {} + +void main() { + late AuthenticationBloc authenticationBloc; + + setUp(() async { + authenticationBloc = MockAuthenticationBloc(); + }); + + tearDown(() { + authenticationBloc.close(); + }); + + Widget createWidget(Widget child) { + return MaterialApp( + home: Builder(builder: (context) { + UiSizeConfig().init(context); + return BlocProvider.value( + value: authenticationBloc, + child: child, + ); + }), + ); + } + + group('Signup test', () { + testWidgets('when invalid credentials are provided', + (WidgetTester tester) async { + await tester.runAsync(() async { + const nameText = ''; + const emailText = ''; + const passwordText = ''; + + when(() => authenticationBloc.state) + .thenReturn(const AuthenticationInitial()); + + await tester.pumpWidget(createWidget(const SignUpScreen())); + final Finder name = find.byKey(const Key('nameField')); + await tester.enterText(name, nameText); + final Finder email = find.byKey(const Key('emailField')); + await tester.enterText(email, emailText); + final Finder password = find.byKey(const Key('passwordField')); + await tester.enterText(password, passwordText); + final Finder signup = find.byKey(const Key('signupButton')); + await tester.tap(signup); + await tester.pump(); + + verifyNever(() => authenticationBloc.add( + const UserSignUp(email: emailText, password: passwordText), + )); + }); + }); + + testWidgets('when valid credentials are provided', + (WidgetTester tester) async { + await tester.runAsync(() async { + const nameText = 'eve'; + const emailText = 'eve.holt@reqres.in'; + const passwordText = 'cityslicka'; + + when(() => authenticationBloc.state) + .thenReturn(const AuthenticationInitial()); + + await tester.pumpWidget(createWidget(const SignUpScreen())); + final Finder name = find.byKey(const Key('nameField')); + await tester.enterText(name, nameText); + final Finder email = find.byKey(const Key('emailField')); + await tester.enterText(email, emailText); + final Finder password = find.byKey(const Key('passwordField')); + await tester.enterText(password, passwordText); + final Finder signup = find.byKey(const Key('signupButton')); + await tester.tap(signup); + await tester.pump(); + + verify(() => authenticationBloc.add( + const UserSignUp(email: emailText, password: passwordText), + )).called(1); + }); + }); + }); +} diff --git a/use_flutter_starter.md b/use_flutter_starter.md new file mode 100644 index 00000000..54e5913e --- /dev/null +++ b/use_flutter_starter.md @@ -0,0 +1,201 @@ +## How to use flutter starter : + +To get started with flutter starter: + +1. Clone the flutter-starter repository from GitHub or click on the use-template button to create an initial template for your project. + +2. Below is the folder structure of the template that will be created + +[**Folder Structure :**](./folder_structure.md) + +3. To add an image or any asset there is a folder named **assets** in the app folder at root location, you can add images under **assets/ images/** and if you want to add google fonts or custom fonts you can create a folder named **fonts** under **assets/** + +4. We have added localisation as a basic set up. Right now, 3 languages have been added in our localisation folder but you can add more according to your use case: English, Spanish, French. [here](lib/l10n). And if you want to change the language as per your choice you can provide a constant value to the locale parameter inside the MaterialApp widget. + +``` + +return MaterialApp.router( +... +locale: const Locale('fr'), +); + +``` + +5. We have added **go_router** as a dependency for routing so that same application can be run on flutter_web too, but if you want you can use basic routing as well by just uncommenting the code and using it as per requirements. You can add routes that you are planning to use in your application in this file. [here](lib/routes) + Below is an example on how you can add a route and return the respective screen. + +``` +GoRoute( + +path: '/home', + +builder: (BuildContext context, GoRouterState state) { + +return const HomeScreen(); + +}, + +), + + +``` + +6. There are two api-services **dio** and **http** that have been set up if you want to provide any network method calls. + +- **http** : We have set up an example of http in the application for signup/ login purposes but you can choose whatever you are comfortable with. You can add more network calls in [http_client.dart](lib/api_sdk/http/http_helpers/http_client.dart) as per your use case. You can modify the http interceptor by adding methods to intercept request and response objects in [http_interceptor.dart](lib/api_sdk/http/http_helpers/http_interceptor.dart) Below is the snippet of how you can call network methods using Http service. + +``` + +class HttpService { + +static getData(String url) async { + +final client = HttpClient(client: HttpApi.createHttp()); + +final response = await client.get(url); + +return response; + +} + +} + +``` + +Now let us consider, you do not want to use **http** as an api-service rather you choose **dio** then you can simply follow the below mentioned steps : + +- Remove http dependency from pubspec.yaml + + ``` + + http: + + http_interceptor: ^1.0.2 + + ``` + +- Under shared folder in repository folder, remove file http_authentication_repository + +- Open api_sdk.dart file and remove these three functions + +``` + +static loginWithEmailAndPassword(dynamic body) async { + +final response = await HttpService.postData(HttpApis.login, body); + +return response; + +} + +static signUpWithEmailAndPassword(dynamic body) async { + +final response = await HttpService.postData(HttpApis.register, body); + +return response; + +} + +static getUserData(int id) async { + +final response = await HttpService.getData(HttpApis.users(id)); + +return response; + +} + +``` + +- Finally get rid of the http folder under api_sdk. + +- **dio** : We have set up base for calling network methods using dio. You can add more network calls in [dio_client.dart](lib/api_sdk/dio/dio_helpers/dio_client.dart) as per your use case. You can modify the dio interceptor by adding methods to intercept request and response objects in [dio_interceptor.dart](lib/api_sdk/dio/dio_helpers/dio_interceptor.dart) Below is the snippet of how you can call network methods using Dio service. + +``` + +class DioService { + +static getUserData(int id) async { + +final client = DioClient(DioApi.createDio()); + +final response = await client.getUsers(id); + +return response; + +} + +} +``` + +Now let us consider, you do not want to use **dio** as an api-service rather you choose **http** then you can simply follow the below mentioned steps : + +- Remove dio dependency from pubspec.yaml, and since we are providing **dio's** support along with **retrofit** therefore we need to its dependency too from pubspec.yaml + + ``` + + retrofit: ^3.0.1+1 + + dio: ^4.0.6 + + ``` + +- Under shared folder in repository folder, remove file dio_authentication_repository + +- Open api_sdk.dart file and remove these two functions + +``` + +static getUserDataDio(int id) async { + +final response = await DioService.getUserData(id); + +return response; + +} + +static postUserDataDio(dynamic body) async { + +final response = await DioService.postUserData(body); + +return response; + +} +``` + +- Finally get rid of the dio folder under api_sdk. + +7. For state management in the application, BLoC has been set up for basic authentication and updating themes in the app. Below are the snippets for updating theme of the application through BLoC state management. + +``` +class UpdateThemeBloc extends Bloc { + +UpdateThemeBloc() : super(const SetTheme(isLightTheme: true)) { + +on((event, emit) { + +if (event is UpdateTheme) { + +emit(SetTheme(isLightTheme: event.isLightTheme)); + +} + +}); + +} + +} +``` + +8. You can add n amount of colours, font sizes, text theme, etc to maintain the theme of your application. + +9. You can remove the default UI screens and do a start fresh too and integrate UI as per your requirement. + +10. You can go and edit test cases as per the use case of your application: + +- **Unit Test Cases :** Unit tests are handy for verifying the behaviour of a single function, method, or class. [here](./test/bloc/) + +- **Integration Test Cases :** They test how individual pieces work together as a whole, or capture the performance of an application running on a real device. [here](./integration_test/app_test.dart) + +- **Widget Test Cases :** They test the UI components. It is used to test a single widget. The main goal of widget testing is to check whether the widget works as expected. [here](./test/screens/) + +11. Run command `flutter run` to get started 🥳 diff --git a/weather_app.gif b/weather_app.gif deleted file mode 100644 index f87e59f4..00000000 Binary files a/weather_app.gif and /dev/null differ diff --git a/app/web/favicon.png b/web/favicon.png similarity index 100% rename from app/web/favicon.png rename to web/favicon.png diff --git a/app/web/icons/Icon-192.png b/web/icons/Icon-192.png similarity index 100% rename from app/web/icons/Icon-192.png rename to web/icons/Icon-192.png diff --git a/app/web/icons/Icon-512.png b/web/icons/Icon-512.png similarity index 100% rename from app/web/icons/Icon-512.png rename to web/icons/Icon-512.png diff --git a/app/web/icons/Icon-maskable-192.png b/web/icons/Icon-maskable-192.png similarity index 100% rename from app/web/icons/Icon-maskable-192.png rename to web/icons/Icon-maskable-192.png diff --git a/app/web/icons/Icon-maskable-512.png b/web/icons/Icon-maskable-512.png similarity index 100% rename from app/web/icons/Icon-maskable-512.png rename to web/icons/Icon-maskable-512.png diff --git a/web/index.html b/web/index.html new file mode 100644 index 00000000..f1c229bb --- /dev/null +++ b/web/index.html @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + flutter_starter + + + + + + + + + + diff --git a/examples/hacker-news/app/web/manifest.json b/web/manifest.json similarity index 92% rename from examples/hacker-news/app/web/manifest.json rename to web/manifest.json index 5620a335..4cba6891 100644 --- a/examples/hacker-news/app/web/manifest.json +++ b/web/manifest.json @@ -1,6 +1,6 @@ { - "name": "app", - "short_name": "app", + "name": "flutter_starter", + "short_name": "flutter_starter", "start_url": ".", "display": "standalone", "background_color": "#0175C2", diff --git a/examples/book-store-firebase/app/windows/.gitignore b/windows/.gitignore similarity index 100% rename from examples/book-store-firebase/app/windows/.gitignore rename to windows/.gitignore diff --git a/examples/hacker-news/app/windows/CMakeLists.txt b/windows/CMakeLists.txt similarity index 83% rename from examples/hacker-news/app/windows/CMakeLists.txt rename to windows/CMakeLists.txt index 9ba329fa..7f2ac06a 100644 --- a/examples/hacker-news/app/windows/CMakeLists.txt +++ b/windows/CMakeLists.txt @@ -1,13 +1,16 @@ +# Project-level configuration. cmake_minimum_required(VERSION 3.14) -project(app LANGUAGES CXX) +project(flutter_starter LANGUAGES CXX) -set(BINARY_NAME "app") +# The name of the executable created for the application. Change this to change +# the on-disk name of your application. +set(BINARY_NAME "flutter_starter") +# Explicitly opt in to modern CMake behaviors to avoid warnings with recent +# versions of CMake. cmake_policy(SET CMP0063 NEW) -set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") - -# Configure build options. +# Define build configuration option. get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) if(IS_MULTICONFIG) set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" @@ -20,7 +23,7 @@ else() "Debug" "Profile" "Release") endif() endif() - +# Define settings for the Profile build mode. set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") @@ -30,6 +33,10 @@ set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") add_definitions(-DUNICODE -D_UNICODE) # 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_17) target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") @@ -38,12 +45,11 @@ function(APPLY_STANDARD_SETTINGS TARGET) target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") endfunction() -set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") - # Flutter library and tool build rules. +set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") add_subdirectory(${FLUTTER_MANAGED_DIR}) -# Application build +# Application build; see runner/CMakeLists.txt. add_subdirectory("runner") # Generated plugin build rules, which manage building the plugins and adding diff --git a/examples/github-repository-list/app/windows/flutter/CMakeLists.txt b/windows/flutter/CMakeLists.txt similarity index 97% rename from examples/github-repository-list/app/windows/flutter/CMakeLists.txt rename to windows/flutter/CMakeLists.txt index b2e4bd8d..930d2071 100644 --- a/examples/github-repository-list/app/windows/flutter/CMakeLists.txt +++ b/windows/flutter/CMakeLists.txt @@ -1,3 +1,4 @@ +# This file controls Flutter-level build steps. It should not be edited. cmake_minimum_required(VERSION 3.14) set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") diff --git a/examples/github-repository-list/app/linux/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc similarity index 64% rename from examples/github-repository-list/app/linux/flutter/generated_plugin_registrant.cc rename to windows/flutter/generated_plugin_registrant.cc index e71a16d2..8b6d4680 100644 --- a/examples/github-repository-list/app/linux/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -7,5 +7,5 @@ #include "generated_plugin_registrant.h" -void fl_register_plugins(FlPluginRegistry* registry) { +void RegisterPlugins(flutter::PluginRegistry* registry) { } diff --git a/examples/book-store-firebase/app/windows/flutter/generated_plugin_registrant.h b/windows/flutter/generated_plugin_registrant.h similarity index 100% rename from examples/book-store-firebase/app/windows/flutter/generated_plugin_registrant.h rename to windows/flutter/generated_plugin_registrant.h diff --git a/examples/hacker-news/app/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake similarity index 61% rename from examples/hacker-news/app/windows/flutter/generated_plugins.cmake rename to windows/flutter/generated_plugins.cmake index ba4a2175..b93c4c30 100644 --- a/examples/hacker-news/app/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -3,7 +3,9 @@ # list(APPEND FLUTTER_PLUGIN_LIST - connectivity_plus_windows +) + +list(APPEND FLUTTER_FFI_PLUGIN_LIST ) set(PLUGIN_BUNDLED_LIBRARIES) @@ -14,3 +16,8 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST}) 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}/windows plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/windows/runner/CMakeLists.txt b/windows/runner/CMakeLists.txt new file mode 100644 index 00000000..b9e550fb --- /dev/null +++ b/windows/runner/CMakeLists.txt @@ -0,0 +1,32 @@ +cmake_minimum_required(VERSION 3.14) +project(runner LANGUAGES CXX) + +# Define the application target. To change its name, change BINARY_NAME in the +# top-level CMakeLists.txt, 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} WIN32 + "flutter_window.cpp" + "main.cpp" + "utils.cpp" + "win32_window.cpp" + "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" + "Runner.rc" + "runner.exe.manifest" +) + +# Apply the standard set of build settings. This can be removed for applications +# that need different build settings. +apply_standard_settings(${BINARY_NAME}) + +# Disable Windows macros that collide with C++ standard library functions. +target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") + +# Add dependency libraries and include directories. Add any application-specific +# dependencies here. +target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) +target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") + +# Run the Flutter tool portions of the build. This must not be removed. +add_dependencies(${BINARY_NAME} flutter_assemble) diff --git a/examples/hacker-news/app/windows/runner/Runner.rc b/windows/runner/Runner.rc similarity index 91% rename from examples/hacker-news/app/windows/runner/Runner.rc rename to windows/runner/Runner.rc index 645c9828..b9420a99 100644 --- a/examples/hacker-news/app/windows/runner/Runner.rc +++ b/windows/runner/Runner.rc @@ -90,12 +90,12 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "com.example" "\0" - VALUE "FileDescription", "app" "\0" + VALUE "FileDescription", "flutter_starter" "\0" VALUE "FileVersion", VERSION_AS_STRING "\0" - VALUE "InternalName", "app" "\0" + VALUE "InternalName", "flutter_starter" "\0" VALUE "LegalCopyright", "Copyright (C) 2022 com.example. All rights reserved." "\0" - VALUE "OriginalFilename", "app.exe" "\0" - VALUE "ProductName", "app" "\0" + VALUE "OriginalFilename", "flutter_starter.exe" "\0" + VALUE "ProductName", "flutter_starter" "\0" VALUE "ProductVersion", VERSION_AS_STRING "\0" END END diff --git a/examples/book-store-firebase/app/windows/runner/flutter_window.cpp b/windows/runner/flutter_window.cpp similarity index 100% rename from examples/book-store-firebase/app/windows/runner/flutter_window.cpp rename to windows/runner/flutter_window.cpp diff --git a/examples/book-store-firebase/app/windows/runner/flutter_window.h b/windows/runner/flutter_window.h similarity index 100% rename from examples/book-store-firebase/app/windows/runner/flutter_window.h rename to windows/runner/flutter_window.h diff --git a/examples/hacker-news/app/windows/runner/main.cpp b/windows/runner/main.cpp similarity index 94% rename from examples/hacker-news/app/windows/runner/main.cpp rename to windows/runner/main.cpp index 4d470b48..de6a3a7b 100644 --- a/examples/hacker-news/app/windows/runner/main.cpp +++ b/windows/runner/main.cpp @@ -27,7 +27,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, FlutterWindow window(project); Win32Window::Point origin(10, 10); Win32Window::Size size(1280, 720); - if (!window.CreateAndShow(L"app", origin, size)) { + if (!window.CreateAndShow(L"flutter_starter", origin, size)) { return EXIT_FAILURE; } window.SetQuitOnClose(true); diff --git a/examples/book-store-firebase/app/windows/runner/resource.h b/windows/runner/resource.h similarity index 100% rename from examples/book-store-firebase/app/windows/runner/resource.h rename to windows/runner/resource.h diff --git a/examples/book-store-firebase/app/windows/runner/resources/app_icon.ico b/windows/runner/resources/app_icon.ico similarity index 100% rename from examples/book-store-firebase/app/windows/runner/resources/app_icon.ico rename to windows/runner/resources/app_icon.ico diff --git a/examples/book-store-firebase/app/windows/runner/runner.exe.manifest b/windows/runner/runner.exe.manifest similarity index 100% rename from examples/book-store-firebase/app/windows/runner/runner.exe.manifest rename to windows/runner/runner.exe.manifest diff --git a/examples/hacker-news/app/windows/runner/utils.cpp b/windows/runner/utils.cpp similarity index 94% rename from examples/hacker-news/app/windows/runner/utils.cpp rename to windows/runner/utils.cpp index d19bdbbc..f5bf9fa0 100644 --- a/examples/hacker-news/app/windows/runner/utils.cpp +++ b/windows/runner/utils.cpp @@ -48,10 +48,10 @@ std::string Utf8FromUtf16(const wchar_t* utf16_string) { int target_length = ::WideCharToMultiByte( CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, -1, nullptr, 0, nullptr, nullptr); - if (target_length == 0) { - return std::string(); - } std::string utf8_string; + if (target_length == 0 || target_length > utf8_string.max_size()) { + return utf8_string; + } utf8_string.resize(target_length); int converted_length = ::WideCharToMultiByte( CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, diff --git a/examples/book-store-firebase/app/windows/runner/utils.h b/windows/runner/utils.h similarity index 100% rename from examples/book-store-firebase/app/windows/runner/utils.h rename to windows/runner/utils.h diff --git a/examples/book-store-firebase/app/windows/runner/win32_window.cpp b/windows/runner/win32_window.cpp similarity index 100% rename from examples/book-store-firebase/app/windows/runner/win32_window.cpp rename to windows/runner/win32_window.cpp diff --git a/examples/book-store-firebase/app/windows/runner/win32_window.h b/windows/runner/win32_window.h similarity index 100% rename from examples/book-store-firebase/app/windows/runner/win32_window.h rename to windows/runner/win32_window.h