diff --git a/Android_Development_With_Flutter/01_Introduction_To_Dart/dart.md b/Android_Development_With_Flutter/01_Introduction_To_Dart/dart.md new file mode 100644 index 0000000000..1404b941dd --- /dev/null +++ b/Android_Development_With_Flutter/01_Introduction_To_Dart/dart.md @@ -0,0 +1,382 @@ +![Introduction to Dart](https://user-images.githubusercontent.com/71007973/133734431-8ebc98ce-a455-4279-b014-6e7f06735907.jpg) +### What is Dart? + +Dart is a programming language to develop multiple platform application in Flutter. +It is a comprehensive language and offers excellent language capabilities, such as Future, Stream, Sound Null Safety. + +#### Dart Libraries : + +* dart:async, +* dart:convert, +* dart:html, +* dart:io, +etc., and also handle package manager pub dev + +### Dart Variables + +A variable acts as a container for values in a program. Variable names are also called identifiers. + +### Rules : +1. Identifiers cannot be keywords. +2. Identifiers can contain alphabets and numbers. +3. Identifiers cannot contain spaces and special characters, except the underscore (_) and the dollar ($) sign. +4. Variable names cannot begin with a number. +#### Syntax : +``` +var var_name = "John Doe"; +int num = 96; +``` +We also **Dynamic Keyword** which helps to change the **datatype** in futures . + +### Data Types + +The most fundamental of the programming language is **Data Type** . +- Numbers - used to represent numeric literals +- Strings - used to represent sequence of characters +- Booleans - used to represent values is True or False +- Lists - used to represent collection of Objects +- Maps - similar to list additionally key value pairs + +### Dart Function + +A function is a set of statements to perform a specific task and helps to reuse code in block manner. After functions are defined , call the function to access code .Moreover, functions make it easy to read and maintain the program’s code. A function declaration tells the compiler about a function's name, return type, and parameters. + +``` +void main() { + print(add(2,5)); +} +add(num1,num2) { + return num1+ num2; +} +``` +### Arrow Functions +Lambda Functions are also called as Arrow functions. +#### What is Lambda ? +Lambda is a short and concise manner to represent small functions. +It must be only one line expression. Just like normal function lambda function cannot have a block of code to execute. +**Syntax** +``` +return_type function_name(arguments) => expression; +``` +**Example** + +``` +int Sum(int num1, int num2) => num1+ num2; +``` +### Dart List + +Dart List is similar to an array. Dart represents arrays in the form of List objects. A List is simply an ordered group of objects. The array is the most popular and commonly used collection in any other programming language. +``` +var list1 = [3,4,6,9,15,20,] +``` +#### Lists can be classified as − +- Fixed Length List + +``` +void main() { + var lst = new List(3); + lst[0] = 12; + lst[1] = 13; + lst[2] = 11; + print(lst); +} +``` +> From the above program we can conclude that **fixed length list** means the size of the list is already **defined** +- Growable List + +``` +void main() { + var lst = new List(); + lst.add(12); + lst.add(13); + print(lst); +} +``` +> From the above program we can conclude that **growable list** means the size of the list grows whenever new elements is added to the list , In other words size of the list is not **predefined** + +### Dart conditonals +The conditionals (ternary) operator is the only Dart Operator that takes three operands: a condition followed by a question mark (?), then an expression to execute if the condition is **truthy** followed by a colon (:), and finally the expression to execute if the condition is **falsy**. + +**Syntax** +``` +condition ? exprIfTrue : exprIfFalse +``` +> Where: +> * condition: An expression whose value is used as a condition. +> * exprIfTrue: An expression which is evaluated if the condition evaluates to a **truthy** value (one which equals or can be converted to true). +> * exprIfFalse: An expression which is executed if the condition is **falsy** (that is, has a value which can be converted to false). + +**Example** + +``` +String message(bool isValid) { + return isValid ? 'This is valid' : 'This is not valid'; +} + +void main() { + print(message(true)); +} +``` + +``` +Center( + child: isLogin ? Text('You are a member') : Text('Hello Guest'), +), +``` + +### Dart Control Flow Statements +You can control the flow of your Dart code using any of the following: +* if and else +* for loops +* while and do-while loops +* break and continue +* switch and case + +#### if and else +Dart supports if statements with optional else statements, as the next sample shows. + +**Syntax** +``` +if (isRaining()) { + you.bringRainCoat(); +} else if (isSnowing()) { + you.wearJacket(); +} else { + car.putTopDown(); +} +``` +#### for loops +You can iterate with the standard for loop. + +**Syntax** +``` +var message = StringBuffer('Dart is fun'); +for (var i = 0; i < 5; i++) { + message.write('!'); +} +``` +#### while and do-while +A while loop evaluates the condition before the loop: + +**Syntax** +``` +while (!isDone()) { + doSomething(); +} +``` +A do-while loop evaluates the condition after the loop: + +**Syntax** +``` +do { + printLine(); +} while (!atEndOfPage()); +``` +#### break and continue +Use break to stop looping: + +**Syntax** +``` +while (true) { + if (shutDownRequested()) break; + processIncomingRequests(); +} +``` +Use continue to skip to the next loop iteration: + +**Syntax** +``` +for (int i = 0; i < candidates.length; i++) { + var candidate = candidates[i]; + if (candidate.yearsExperience < 5) { + continue; + } + candidate.interview(); +} +``` +#### Switch and case +Switch statements in Dart compare integer, string, or compile-time constants using ==. The compared objects must all be instances of the same class (and not of any of its subtypes), and the class must not override ==. Enumerated types work well in switch statements. + +Each non-empty case clause ends with a break statement, as a rule. Other valid ways to end a non-empty case clause are a continue, throw, or return statement. + +Use a default clause to execute code when no case clause matches: + +**Syntax** +``` +var command = 'OPEN'; +switch (command) { + case 'CLOSED': + executeClosed(); + break; + case 'PENDING': + executePending(); + break; + case 'APPROVED': + executeApproved(); + break; + case 'DENIED': + executeDenied(); + break; + case 'OPEN': + executeOpen(); + break; + default: + executeUnknown(); +} +``` + +### Dart Classes +Dart is an object-oriented language. It supports object-oriented programming features like classes, interfaces, etc. A class in terms of OOP is a blueprint for creating objects. A class encapsulates data for the object. Dart gives built-in support for this concept called class. +### Declaring a Class +Use the class keyword to declare a class in Dart. A class definition starts with the keyword class followed by the class name; and the class body enclosed by a pair of curly braces. + +**Syntax** +``` +class class_name { + + + + +} +``` +The **class** keyword is followed by the class name. The rules for identifiers must be considered while naming a class. +A class definition can include the following − +* Fields − A field is any variable declared in a class. Fields represent data pertaining to objects. +* Setters and Getters − Allows the program to initialize and retrieve the values of the fields of a class. A default getter/ setter is associated with every class. However, the default ones can be overridden by explicitly defining a setter/ getter. +* Constructors − responsible for allocating memory for the objects of the class. +* Functions − Functions represent actions an object can take. They are also at times referred to as methods. + +**Example** +``` +class Car { + // field + String engine = "E1001"; + + // function + void disp() { + print(engine); + } +} +``` +> The example declares a class Car. The class has a field named engine. The disp() is a simple function that prints the value of the field engine. + +### Creating Instance of the class +To create an instance of the class, use the new keyword followed by the class name. + +**Syntax** +``` +var object_name = new class_name([ arguments ]) +``` +> * The new keyword is responsible for instantiation. +> * The right-hand side of the expression invokes the constructor. The constructor should be passed values if it is parameterized. + +**Example: Instantating a Class** +``` +var obj = new Car("Engine 1") +``` + +### Accessing Attributes and Functions +A class’s attributes and functions can be accessed through the object. Use the ‘.’ dot notation (called as the period) to access the data members of a class. +``` +//accessing an attribute +obj.field_name + +//accessing a function +obj.function_name() +``` + +**Example** +``` +void main() { + Car c= new Car(); + c.disp(); +} +class Car { + // field + String engine = "E1001"; + + // function + void disp() { + print(engine); + } +} +``` +The output of the above program will be **E1001** + +### Dart Constructors +A constructor is a special function of the class that is responsible for initializing the variables of the class. Dart defines a constructor with the same name as that of the class. A constructor is a function and hence can be parameterized. However, unlike a function, constructors cannot have a return type. If you don’t declare a constructor, a default no-argument constructor is provided for you. + +**Syntax** +``` +Class_name(parameter_list) { + //constructor body +} +``` +**Example** +``` +void main() { + Car c = new Car('E1001'); +} +class Car { + Car(String engine) { + print(engine); + } +} +``` +The output of the above program will be **E1001** + +### Dart Class ─ Getters and Setters +**Getters** and **Setters**, also called as **accessors** and **mutators**, allow the program to initialize and retrieve the values of class fields respectively. Getters or accessors are defined using the get keyword. Setters or mutators are defined using the **set** keyword. + +A default getter/setter is associated with every class. However, the default ones can be overridden by explicitly defining a setter/ getter. A getter has no parameters and returns a value, and the setter has one parameter and does not return a value. + +**Syntax: Defining a getter** +``` +Return_type get identifier +{ +} +``` + +**Syntax: Defining a setter** +``` +set identifier +{ +} +``` + +**Example** +``` +class Student { + String name; + int age; + + String get stud_name { + return name; + } + + void set stud_name(String name) { + this.name = name; + } + + void set stud_age(int age) { + if(age<= 0) { + print("Age should be greater than 5"); + } else { + this.age = age; + } + } + + int get stud_age { + return age; + } +} +void main() { + Student s1 = new Student(); + s1.stud_name = 'MARK'; + s1.stud_age = 0; + print(s1.stud_name); + print(s1.stud_age); +} +``` + + - - - - \ No newline at end of file diff --git a/Android_Development_With_Flutter/01_Introduction_To_Dart/exercises.md b/Android_Development_With_Flutter/01_Introduction_To_Dart/exercises.md new file mode 100644 index 0000000000..b52ff0e4d6 --- /dev/null +++ b/Android_Development_With_Flutter/01_Introduction_To_Dart/exercises.md @@ -0,0 +1,932 @@ +# 💻 Exercises + +## 📑 Contents + +- [Variables](#-variables) +- [Conditional Statements](#-conditional-statements) +- [Loop Statements](#loop-statements) +- [Maps And Lists](#1-maps) +- [ForEach And Map](#-foreach-and-map) +- [Inheritance](#-inheritance-in-dart) +- [Functions](#functions) +- [Strings](#strings) + +# ✅ Variables + +- Write a program to print a name and a number. + + ```dart + void main() { + int num=12; + String name="John"; + print(num); + print(name) ; + } + ``` + + ``` + Output- + 12 John + ``` + +- Use of var keyword + + ```dart + //We can declare any data types using var keyword. + // For example:- + var name = 'Vani'; + var year = 1999; + var radius = 4.5; + var array = ['Ram', 'Sita', 'Mohan']; + + ``` + +- How to declare a variable which stay constant at compile time? Demonstrate with example. + + ```dart + /* The final and const keyword are used to declare constants. We can not modify the values of a variable declared using the final or const keyword. */ + + For example:- + void main() { + final v1 = 12; + const v2 = 13; + v2 = 12; + } + + // The code given above will throw error. + + ``` + +# ✅ Conditional Statements + +## 1. If Condition + +- Print "Excellent work" if the student scores A grade + + ```dart + void main() { + String grade = "A"; + if (grade == "A") { + print("Excellent work"); + } + } + ``` + + ```sh + Output: + Excellent work + ``` + +## 2. If Else Condition + +- Find maximum between two numbers + +```dart + import 'dart:io'; + + void main() { + print("Enter first number"); + int? num1 = int.parse(stdin.readLineSync()!); //using ? and ! because of null safety + print("Enter second number"); + int? num2 = int.parse(stdin.readLineSync()!);//Getting input from user + + if (num1 > num2) { + print("First number is greater"); + } else { + print("Second number is greater"); + } + } +``` + +```sh + Output: + Enter first number + 30 + Enter second number + 20 + First number is greater +``` + +## 3. Else If Ladder Condition + +- Write a progeram to input the names of five subjects Physics,Chemistry,Biology, + Maths and Computer. Calculate percentage and grade according to the given conditions + - Percentage >= 90% : Grade A + - Percentage >= 80% : Grade B + - Percentage >= 70% : Grade C + - Percentage >= 60% : Grade D + - Percentage >= 40% : Grade E + - Percentage < 40% : Grade F + +```dart + import 'dart:io'; + + void main() { + stdout.write("Enter Physics Mark: "); + int? physics = int.parse(stdin.readLineSync()!);//Getting input from user + stdout.write("Enter Chemistry Mark: "); + int? chemistry = int.parse(stdin.readLineSync()!);//using ? and ! because of null safety + stdout.write("Enter Biology Mark: "); + int? biology = int.parse(stdin.readLineSync()!); + stdout.write("Enter Maths Mark: "); + int? maths = int.parse(stdin.readLineSync()!); + stdout.write("Enter Computer Mark: "); + int? computer = int.parse(stdin.readLineSync()!); + + double percentage = double.parse( + ((chemistry + physics + maths + biology + computer) / 5.0)//Getting total percentage + .toStringAsFixed(2)); + print("Percentage is : $percentage"); + + if (percentage >= 90) { + print("Grade A"); + } else if (percentage >= 80) { + print("Grade B"); + } else if (percentage >= 70) { + print("Grade C"); + } else if (percentage >= 60) { + print("Grade D"); + } else if (percentage >= 40) { + print("Grade E"); + } else { + print("Grade F"); + } + } +``` + +```sh + Output: + Enter Physics Mark: 40 + Enter Chemistry Mark: 60 + Enter Biology Mark: 70 + Enter Maths Mark: 50 + Enter Computer Mark: 90 + Percentage is : 62.0 + Grade D +``` + +## 4. Nested - If Condition + +- Find Maximum between three numbers + +```dart +import 'dart:io'; + +void main() { + int max; + stdout.write("Enter First Number: "); + int? number1 = int.parse(stdin.readLineSync()!);//Getting input from user + stdout.write("Enter Second Number: "); + int? number2 = int.parse(stdin.readLineSync()!); + stdout.write("Enter Third Number: "); + int? number3 = int.parse(stdin.readLineSync()!); + + if (number1 > number2) { + if (number1 > number3) { + /* If number1 > number2 and number1 > number3 */ + print("Maximum Number = $number1"); + } else { + /* If number1 > number2 but number1 > number3 is not true */ + print("Maximum Number = $number3"); + } + } else { + if (number2 > number3) { + /* If number1 is not > number2 and number2 > number3 */ + print("Maximum Number = $number2"); + } else { + /* If number1 is not > number2 and number2 > number3 */ + print("Maximum Number = $number3"); + } + } +} +``` + +```sh +Output: +Enter First Number: 3 +Enter Second Number: 16 +Enter Third Number: 60 +Maximum Number = 60 +``` + +## 5. Switch Case + +- Program to print day by mentioning week number + +```dart +import 'dart:io'; + +void main() { + stdout.write("Enter a week number between (1-7): "); + int? week = int.parse(stdin.readLineSync()!); + switch (week) { + case 1: + print("Monday"); + break; + case 2: + print("Tuesday"); + break; + case 3: + print("Wednesday"); + break; + case 4: + print("Thursday"); + break; + case 5: + print("Friday"); + break; + case 6: + print("Saturday"); + break; + case 7: + print("Sunday"); + break; + default: + print("Invalid input! Please enter week number between 1-7."); + } +} + +``` + +```sh +Enter a week number between (1-7): 4 +Thursday +``` +# ✅Loop Statements + +## 1.For Loop + +- Program to print alphabets from a-z + +```dart +void main() { + int ch; + int a = 'a'.codeUnitAt(0); + int z = 'z'.codeUnitAt(0); + + for (ch = a; ch <= z; ch++) { + print(String.fromCharCode(ch)); + } +} + +``` + +```sh +Output: +a +b +c +d +e +f +g +h +i +j +k +l +m +n +o +p +q +r +s +t +u +v +w +x +y +z +``` +## 2. While Loop + +- Program to print natural numbers from 1 till n . + +```dart +import 'dart:io'; + +void main() { + int i; + stdout.write("Print natural numbers from 1 till : "); + int? end = int.parse(stdin.readLineSync()!); + i = 1; + while (i <= end) { + print(i); + i++; + } +} +``` + +```sh +Print natural numbers from 1 till : 10 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +``` + +## 3. Do While Loop +- Program to print multiples of a number +```dart +import 'dart:io'; + +void main() { + int i = 1, number = 0; + stdout.write("Enter a number:"); + number = int.parse(stdin.readLineSync()!); + do { + print(number * i); + i++; + } while (i <= 10); +} +``` +```sh +Enter a number:5 +5 +10 +15 +20 +25 +30 +35 +40 +45 +50 +``` +# ✅Maps And Lists + +## 1. Maps + +- Access the student via roll no + +```dart +// Map is a data type which contains key , value pairs and the values can only be accessed by using keys. +// Every Key is unique in Map but the values can be same. +// The map that I have created in this example is . + +void main() { +Map data = { +"1": "Rohan", +"2": "Rohit", +"3": "Pranav", +}; +print(data["1"]); +print(data["2"]); +print(data["3"]); +} +``` + +```sh +Output: + Rohan + Rohit + Pranav +``` + +## 2. Lists + +- Create a list and access their all values and add one extra value and print all again. + +```dart +// List is simply an ordered group of objects. +// The values in Lists are also accessed by Indices. +// The List can be growable + +void main(){ +List myList = ["This is the First index" , "This is the Second index" , "This is the Third index"]; + +print("List before the adding: "); +for(int i=0 ; iprint(number*number)); + } +``` + +```sh + Output: + 4 + 9 + 25 + 36 + 64 + 81 +``` + +**B)** + +```dart + void main(){ + var principal_amount = [100,500,2000,700,950]; + var op = principal_amount.map((p)=>p*2*15/100); + print(op); + } +``` + +```sh + Output: + (30, 150, 600, 210, 285) +``` + + **C)** + +```dart + void main(){ + var studentHeigths = [171,185,163,154,173]; + var op = studentHeigths.reduce((current,next)=>current+next); + print(op/studentHeigths.length); + } +``` + +```sh + Output: + 169.2 +``` + +- Given an array of building heights **bHeights** = [828,501,1002,321,978,200], sort the array and print the building heights in descending order. + +```dart + void main(){ + var bHeights = [828,501,1002,321,978,200]; + bHeights.sort((h1,h2)=>h2-h1); + bHeights.forEach((height)=>print(height)); + } +``` + +```sh + + Output: + 1002 + 978 + 828 + 501 + 321 + 200 + +``` + +- Given an array of shortlisted candidates for a program **candidates** = ["James","Joseph","Jessica","John","Jonas"], check if a student called John is present in it. + +```dart + void main(){ + var candidates = ["James","Joseph","Jessica","John","Jonas"]; + print(candidates.contains("John")); + } +``` + +```sh + Output: + true +``` + +# ✅ Inheritance in Dart + +## Question + +- Write a program with class **Student** as the super class and class **ScienceStudent** as its child. Class MathsStudent is in turn the child of ScienceStudent. Student class has two methods **walk()** and **talk()**. Class ScienceStudent has a method **studiesScience()** and lass MathsStudent has a method **likesMaths()**. Inherit the properties of the super class in the sub classes. + +## Solution + +```dart +/*As the Student() class is the the top most in hierarchy followed by the ScienceStudent and MathsStudent classes, the properties of Student class is retaied in both the classes.*/ + + class Student{ + void walk() { + print("The student walks.\n"); + } + void talk() { + print("The student talks.\n"); + } + } + + // Inherits the super class + class ScienceStudent Extends Student{ + //child class function + void studiesScience(){ + print("The student studies Science.\n"); + } + } + + // Inherits the super class + class MathsStudent extends ScienceStudent{ + //child class function + void likesMaths{ + print("The student likes Maths.\n"); + } + } + + void main(){ + // Creating object of the child class + MathsStudent student=new MathsStudent(); + student.likesMaths(); + student.studiesScience(); + student.walk(); + student.talk(); + } +``` + +## Output + +```sh +The student likes Maths. +The student studies Science. +The student walks. +The student talks. +``` + +# ✅Functions + + +## Example Question and solution + +- Find the sum of 2 numbers ? + +```dart +/*Functions are the building blocks of readable, maintainable, and reusable code. A function is a set of statements to perform a specific task.*/ + +void main() { +var c = sum(30,20); +print("The sum of two numbers is: ${c}"); +} + +int sum(int a, int b){ + int result; + result = a+b; + return result; +} +``` + +```sh +Output: +The sum of two numbers is: 50 +``` + +>From the above example we can conclude that, sum is the name of the function, and in +main function we are calling the function in the name of c and printing it. + +### Questions: + +- Find the factorial of a number by getting the input from the user. + +```dart +import 'dart:io'; + +void main() { + stdout.write("Enter a number:"); + int? n = int.parse(stdin.readLineSync()!); + print(factorial(n)); +} + +int factorial(int n) { + int res = 1, i; + for (i = 2; i <= n; i++) res *= i; + return res; +} +``` + +```sh +Output: +Enter a number:5 +120 +``` + +- Find the number is palindrome or not using function. + +```dart +import 'dart:io'; + +void main() { + + + /* Input a number from user */ + print("Enter any number to check palindrome: "); + int? number = int.parse(stdin.readLineSync()!); + print(isPalindrome(number)); + +} + +String isPalindrome(int number) { + int n = number ; + int reverse=0; + + /* Find reverse of number and store in rev */ + while (n != 0) { + reverse = (reverse * 10) + (n % 10); + n = n~/10; + } + + /* Check if reverse is equal to number or not */ + if (reverse == number) { + return "$number is palindrome."; + } + return "$number is not palindrome."; +} + +``` +```sh +Enter any number to check palindrome: +121 +121 is palindrome. +``` +- Write a function to find out if a number is prime or not. + +```dart +import 'dart:io'; + +void main() { + stdout.write('Enter a number:'); + int? number = int.parse(stdin.readLineSync()!); + checkPrime(number); +} + +void checkPrime(int number) { + int i, m = 0, flag = 0; + + m = number ~/ 2; + for (i = 2; i <= m; i++) { + if (number % i == 0) { + print('$number is not a prime number'); + flag = 1; + break; + } + } + if (flag == 0) { + print('$number is prime number'); + } +} +``` + +```sh +Output: +Enter a number:2 +2 is prime number +``` + + +# ✅Strings + +A Dart string is a sequence of UTF-16 (16-bit Unicode Transformation Format) code units. Strings are mainly used to represent text. A character may be represented by multiple code points, each code point consisting of one or two code units It makes Dart more powerful to build our cross-platform applications in any language. Here we are going to take three basic questions based upon Strings and implement them using Dart programming language. + +- How to create Strings in Dart ? +- How to input String data in Dart ? +- How to get a substring from a given String in Dart ? + + + +### How to create Strings in Dart ? + +**Create normal Strings** +To create a String, we can use single or double quotes: + +**Example:** + +```dart +String s1 = 'GirlScript Winter of Contributing'; +String s2 = "GirlScript Summer of Code"; + +String s3 = 'It\'s possible to have a string with single quotes in Dart!'; +String s4 = "It's possible to have a string with single quotes in Dart!"; + +// It\'s possible to have a string with single quotes in Dart! + +``` + +**Create raw Strings** +For raw string, we’re gonna use r before quotation mark of a string: + +**Example:** + +```dart + +String raws1 = r'gwoc.girlscript.tech\nGirlScript Winter of Contributing'; +print(raws1); + +// gwoc.girlscript.tech\nGirlScript Winter of Contributing + +String raws2 = r"It's possible to have a string with single quotes in Dart!"; +print(raws2); + +// It's possible to have a string with single quotes in Dart! +``` + + + + +**Create multi-lines Strings** +We’re gonna use a triple quote to create a multi-lines Strings: + +**Example:** + +```dart +String s1 = '''gwoc.girlscript.tech +GirlScript Winter of Contributing'''; +print(s1); +/* +gwoc.girlscript.tech +GirlScript Winter of Contributing +*/ + +String s2 = """gssoc.girlscript.tech +GirlScript Summer of Code"""; +print(s2); +/* +gssoc.girlscript.tech +GirlScript Summer of Code +*/ +``` + + +### How to input String data in Dart ? + +In Dart programming language, you can take standard input from the user through the console via the use of **.readLineSync()** function. To take input from the console you need to import a library, named **dart:io** from libraries of Dart. + +**Stdin** class allows the user to read data from standard input in both synchronous and asynchronous ways. The method **readLineSync()** is one of the methods used to take input from the user. + +**Example:** +```dart +// importing dart:io file +import 'dart:io'; + +void main() +{ + print("Enter your name?"); + // Reading string from the console + String? name = stdin.readLineSync(); + + // Printing the name with a Hello + print("Hello, $name! \n!"); +} + +``` + + + + +### How to get a substring from a given String in Dart ? + + +To get substring from a Dart String, we use `substring()` method. This is the signature of `substring()` method that returns a `String`: + +```dart +String substring(int startIndex, [int endIndex]); + +``` + +– `startIndex`: index of character to start with. Beginning index is `0`. +– `endIndex` (optional): index of ending character + `1`. If it is not set, the result will be a subtring starting from `startIndex` to the end of the string. + +**Example:** +```dart +String str = 'GirlScript'; +str.substring(0,8); // GirlScri +str.substring(2,8); // rlScri +str.substring(3); // lScript +``` + +## 💻 Exercises + +- Create a string and print the same + + +```dart +import 'dart:io'; + +void main() +{ + String name= "Open Source Contributor" + print("name \n"); + } + ``` + ``` +Output: +Open Source Contributor +``` + +- Write a code that takes multiple strings as a input and print customized message + +```dart +import 'dart:io'; + +void main() +{ + print("Enter your name\n"); + + String name = stdin.readLineSync(); + print("Enter your favourite programming language\n"); + + String lang = stdin.readLineSync(); + print("Are you proficient in $lang?. Enter Yes or No only\n"); + + String resp = stdin.readLineSync(); + if(resp){ + print("Congrats! $name you are welcome to contribute to the $lang project\n"); + } + else{ + print("Sorry, $name you need to hone your $lang skills first\n"); + } + + +``` + + ``` + Output: + Enter your name + XYZ + Enter your favourite programming language + Java + Are you proficient in Java?. Enter Yes or No only + Yes + Congrats! XYZ you are welcome to contribute to the Java project + + ``` + +- Write a program which we take a input String and find the substring of it defined by starting index and ending index which is also given by user. + +```dart +import 'dart:io'; +void main() +{ + +print("Enter a string of your choice\n"); ` + String input = stdin.readLineSync(); + + print("Enter startIndex\n"); + int sindex = int. parse(stdin. readLineSync()); + print("Enter endIndex\n"); + int eindex = int. parse(stdin. readLineSync()); + +if(sindex>0 &&eindex<=input.length){ +String result = str.substring(sindex, eindex); +print(result); +} +else +print("Wrong indices provided"); +} +``` + +``` + +Output: + Enter a string of your choice + GirlScriptwinterofcontributing + + Enter startIndex + 1 + + Enter endIndex + 10 + + irlScriptw + + + + ``` diff --git a/Android_Development_With_Flutter/01_Introduction_To_Dart/null_safety.md b/Android_Development_With_Flutter/01_Introduction_To_Dart/null_safety.md new file mode 100644 index 0000000000..8a5c02e3a3 --- /dev/null +++ b/Android_Development_With_Flutter/01_Introduction_To_Dart/null_safety.md @@ -0,0 +1,56 @@ +# Null Safety + +With the release of Dart 2, Dart's null safety feature has been enabled by default. + +### But What is Null Safety ? + +By default, Dart will throw an error if you try to use a null reference. That means any variable you create cannot be null. With null safety, your **runtime** null-dereference errors turn into **edit-time** analysis errors. + +##### Let's see an example + +```dart +int a = 42; // --> cannot be null so initialized with a value +String name = 'John'; +final c = foo(); + +// What Happens if you don't initialize a variable? +int a; // --> Compiler will throw an error + +``` + +**What if you need a variable that can be null ?** + +To make a variable nullable, you need to add the `?` operator to its type declaration. + +```dart + +int ? value; // --> this variable can be null + +// So if you decide to give this variable a value or not, +//Compiler will not complain about Null Reference +``` + +## Why Null Safety ? + +Let's take a look at the following example: + +```dart +// A boolean function which return true if the string +// length is equal to 0 otherwise false +bool isEmpty(String string) => string.length == 0; + +void main() { + isEmpty(null); +} +``` + +Now, if you run this code without null safety, you will get an error at runtime: +It throws [*NoSuchMethodError*](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html) exception on the call to [*.length*](https://api.flutter.dev/flutter/dart-core/String/length.html) method. + +` The null value is an instance of the Null class, and Null has no “length” getter. ` + +Now you must be thinking why would I pass a null value to a function if I know that the function will not accept null values ? + +In this case your doubt seems legit. But what if you are working on a big codebase and somewhere you are passing a variable to a function but during runtime you get **Null** exception error ? Good luck finding the null variable then. + +To know more about Null Safety problem, you can read this [article](https://www.infoq.com/presentations/Null-References-The-Billion-Dollar-Mistake-Tony-Hoare/). \ No newline at end of file diff --git a/Android_Development_With_Flutter/02_Introduction_To_Flutter/Deeplinking.md b/Android_Development_With_Flutter/02_Introduction_To_Flutter/Deeplinking.md new file mode 100644 index 0000000000..b5287af83a --- /dev/null +++ b/Android_Development_With_Flutter/02_Introduction_To_Flutter/Deeplinking.md @@ -0,0 +1,99 @@ +

:yellow_circle: Deep Linking :yellow_circle:

+ +### What is deep linking? +Deep linking is the ability to jump into a specific place in your application from somewhere outside of the application.For example,if your friend shares a link of a video from youtube through a messaging service and when you click on the link it either redirects you to the app if you have it downloaded or it redirects you to appstore or playstore for you to download the app. + +To enable deep linking for android : +#### AndroidManifest.xml +```xml + + + + + + + + + + + +``` + +Before moving to coding the application we need to add [uni_links](https://pub.dev/packages/uni_links) package + +#### pubspec.yaml + +```yaml +dependencies: + uni_links: ^0.5.1 +``` + + + + +#### main.dart +```dart +import 'package:flutter/material.dart'; + +import 'package:uni_links/uni_links.dart'; + +void main() { + WidgetsFlutterBinding.ensureInitialized(); + + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + const MyApp({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'Flutter Demo', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: HomePage(), + ); + } +} + +class HomePage extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text('Deep Links'), + ), + body: FutureBuilder( + future: getInitialLink(), + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + return const Center(child: CircularProgressIndicator()); + } + final link = snapshot.data ?? ''; + final message = + link.isEmpty ? 'Opened directly' : 'Opened with\n$link'; + return Center( + child: Text( + message, + textAlign: TextAlign.center, + style: const TextStyle( + fontSize: 30, + fontWeight: FontWeight.bold, + ), + ), + ); + }), + ); + } +} + +``` + +![deep1](https://user-images.githubusercontent.com/76723996/139531870-6e194d80-e84c-4b1e-bf0e-0aaa5680d4a5.png) +![deep2](https://user-images.githubusercontent.com/76723996/139531929-40c93980-00b0-4a41-b38f-5ec8a2eeb6cc.png) +![deep 3](https://user-images.githubusercontent.com/76723996/139531880-ab2f4b3b-9b71-400d-a4bb-4dd3ea2103df.png) diff --git a/Android_Development_With_Flutter/02_Introduction_To_Flutter/Material_components.md b/Android_Development_With_Flutter/02_Introduction_To_Flutter/Material_components.md new file mode 100644 index 0000000000..5ae895d7cb --- /dev/null +++ b/Android_Development_With_Flutter/02_Introduction_To_Flutter/Material_components.md @@ -0,0 +1,1486 @@ +

:yellow_circle: Flutter Material Components :yellow_circle:

+ +### 📑 Contents + +- [:point_right: MaterialApp():](#point_right-materialapp) +- [:point_right: Scaffold():](#point_right-scaffold) +- [:point_right: TabBar():](#point_right-tabbar) +- [:point_right: ElevatedButton():](#point_right-elevatedbutton) +- [:point_right: DropDownButton():](#point_right--dropdownbutton) +- [:point_right: IconButton():](#point_right-iconbutton) +- [:point_right: OutlinedButton():](#point_right-outlinedbutton) +- [:point_right: PopupMenuButton():](#point_right-popupmenubutton) +- [:point_right: TextButton():](#point_right-textbutton) +- [:point_right: Checkbox():](#point_right--checkbox) +- [:point_right: Date and Time picker:](#point_right-date-and-time-picker) +- [:point_right: Radio():](#point_right-radio) +- [:point_right: Slider():](#point_right-slider) +- [:point_right: Switch():](#point_right-switch) +- [:point_right: TextField():](#point_right-textfield) +- [:point_right: AlertDialog():](#point_right-alertdialog) +- [:point_right: SnackBar():](#point_right-snackbar) +- [:point_right: Card():](#point_right-card) +- [:point_right: CircularProgressIndicator() and LinearProgressIndicator():](#point_right-circularprogressindicator-and-linearprogressindicator) +- [:point_right: Image():](#point_right-image) + +## :point_right: MaterialApp(): + +MaterialApp is the main component in flutter. It is a class in flutter. It allows us to acces widgets such as AppBar,Scaffold,Texxtfield,IconButton,Themedata etc making the look of your appp more attractive. + +It takes in the following basic constructors: + +**title:** This helps the user to give a short title for the app which will be displayed when the user opens the recent apps. + +**theme:** This is used to provide theme-color of the application. It takes an inbuilt widget `ThemeData()` which takes in properties related to theme. By using ThemeData() we can specify other components such as AppBar,TextTheme,darkTheme etc. + +**home:** This is the default route of the app which means whenever the application runs, the widget which is specified here will run first. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'App', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: Text("Hello"), + ); + } +} + +``` + +![MaterialApp](https://user-images.githubusercontent.com/76723996/136075993-7a33b9e8-5ccb-4f86-8e44-bb2b5d69980e.png) + +## :point_right: Scaffold(): + +Scaffold is a widget which provides a base screen for the child widget to render on. It occupies whole device screen. This class provides widgets or Api's for components such as Drawer, SnackBar, BottomNavigationBar, AppBar, FloatingActionButton, etc thus saving time from building each components manually. + +Some of the constructors are: + +**appBar:** It is a bar which is displayed at the top of the screen. It uses an `AppBar()` class which contain properties to alter the look of the appbar. + +**body:** It is used to display widgets in scaffold such as floatingactionbutton ,drawer etc. By default these widgets get positioned at the top left corner below the app bar. + +**drawer:** This displays a drawer to the left side with an icon (hamburger icon) on the appbar. The swipe gesture open the drawer is automatically set to true. It takes in a `Drawer()` class where you specify the items you want to show in the drawer + +**floatingActionButton:** It displays a round floating button to the bottom right corner of the body .It floats over the the contents of the screen. It is used to perform quick actions such as adding a new note in your notes app , marking a date in your calender etc. It takes in `FloatingActionButton()` class where you can specify the way the button should look. + +**bottomNavigationBar:** This property displays a navigation bar at the bottom of the screen. This bar contains icons related to page it is going to take you if you click that. It takes in `BottomNavigationBarItem()` class where you could specify the title ,icon and the process it has to do when you tap in onTap. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'App', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: HomePage(), + ); + } +} + +class HomePage extends StatefulWidget { + const HomePage({Key? key}) : super(key: key); + + @override + State createState() => _HomePageState(); +} + +int i = 0; +int _currindex = 0; + +class _HomePageState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("Tab Bar"), + ), + body: Container( + alignment: Alignment.center, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + "Hello", + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 21.0), + ), + Text( + "Pressed floating action button $i times", + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 21.0), + ) + ], + ), + ), + drawer: Drawer( + child: ListView( + children: [ + ListTile( + title: Text("Item 1"), + onTap: () { + //Write code to update state + Navigator.pop(context); + }, + ), + ListTile( + title: Text("Item 2"), + onTap: () { + //Write code to update state + Navigator.pop(context); + }, + ), + ListTile( + title: Text("Item 3"), + onTap: () { + //Write code to update state + Navigator.pop(context); + }, + ) + ], + ), + ), + floatingActionButton: FloatingActionButton( + child: Icon(Icons.add), + onPressed: () { + setState(() { + i++; + }); + }, + ), + bottomNavigationBar: BottomNavigationBar( + items: [ + BottomNavigationBarItem(label: "Home", icon: Icon(Icons.home)), + BottomNavigationBarItem(label: "Camera", icon: Icon(Icons.camera)), + BottomNavigationBarItem(label: "Profile", icon: Icon(Icons.person)), + ], + currentIndex: _currindex, + iconSize: 30, + onTap: (index) { + setState(() { + _currindex = index; + }); + }, + ), + ); + } +} + +``` + +![ezgif com-gif-maker](https://user-images.githubusercontent.com/76723996/136261295-953d88fd-7877-4d6a-8f35-0bc38818fcd8.gif) + +## :point_right: TabBar(): + +This class allows us to create tabs for easy navigation between screens. To have tabs first we need to create `TabBar()` and `TabBarView()` and combine Them with `TabController()`.This controller help in syncing the tab with the screen. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'App', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: HomePage(), + ); + } +} + +class HomePage extends StatelessWidget { + @override + Widget build(BuildContext context) { + return DefaultTabController( + child: Scaffold( + appBar: AppBar( + title: Text("Tab Bar"), + bottom: TabBar( + tabs: [ + Tab( + text: "Tab 1", + ), + Tab( + text: "Tab 2", + ) + ], + ), + ), + body: TabBarView( + children: [Tab1(), Tab2()], + ), + ), + length: 2, + initialIndex: 0, + ); + } +} + +class Tab1 extends StatelessWidget { + const Tab1({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Center( + child: Text("Tab 1", style: TextStyle(fontSize: 30)), + ); + } +} + +class Tab2 extends StatelessWidget { + const Tab2({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Center( + child: Text("Tab 2", style: TextStyle(fontSize: 30)), + ); + } +} + +``` + +![ezgif com-gif-maker (1)](https://user-images.githubusercontent.com/76723996/136261504-a820796f-3805-4743-accf-08bb02801a70.gif) + +## :point_right: ElevatedButton(): + +ElevatedButton is one of the material design component provided by flutter.This button gets elevated if the user clicks on it. + +- **ElevatedButton.icon():** + - This allows you to add an icon to the button. +- **ElevatedButton.styleFrom():** + - This allows you to style the button. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'App', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: HomePage(), + ); + } +} + +class HomePage extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("Elevated Button"), + ), + body: Center( + child: Column( + children: [ + ElevatedButton( + onPressed: () {}, + child: Text("Elevated Button"), + style: ElevatedButton.styleFrom( + //Use ElevatedButton.styleFrom() to style the look of the button + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0))), + ), + ElevatedButton.icon( + icon: Icon(Icons.add), + onPressed: () {}, + label: Text("Elevated Button"), + ) + ], + ), + ), + ); + } +} + +``` + +![Elevated button](https://user-images.githubusercontent.com/76723996/136261691-6dc34e88-fb92-4d19-9621-74584d07d6b1.png) + +## :point_right: DropDownButton(): + +Dropdown button is a material component allows to display a dropdown list from which users can select an item and navigate to it. It takes in `items` and `onChanged` as required argument. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'App', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: HomePage(), + ); + } +} + +class HomePage extends StatefulWidget { + @override + State createState() => _HomePageState(); +} + +class _HomePageState extends State { + String? value; + + List _items = ["Item 1", "Item 2", "Item 3"]; + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("Drop Down Button"), + ), + body: Center( + child: Container( + child: DropdownButton( + icon: Icon( + Icons.arrow_drop_down_rounded, + size: 30, + ), + value: value, + onChanged: (String? newVal) { + setState(() { + value = newVal; + }); + }, + hint: Text("Select Item"), + items: _items.map((valueofitem) { + return DropdownMenuItem( + value: valueofitem, + child: Text(valueofitem), + ); + }).toList(), + ), + ), + ), + ); + } +} + +``` + +![ezgif com-gif-maker (2)](https://user-images.githubusercontent.com/76723996/136261850-0faa0265-78c0-4308-871f-635cff9d6766.gif) + +## :point_right: IconButton(): + +Icon button allows to use icons as buttons. It gives a splash effect as feedback. It requires an `onPressed` where you mention what the button has to do. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'App', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: HomePage(), + ); + } +} + +class HomePage extends StatefulWidget { + @override + State createState() => _HomePageState(); +} + +class _HomePageState extends State { + int i = 0; + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("Icon Button"), + ), + body: Container( + alignment: Alignment.center, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + IconButton( + onPressed: () { + setState(() { + i++; + }); + }, + icon: Icon( + Icons.add, + size: 50, + color: Colors.red, + ), + ), + Text("Button pressed $i times", + style: TextStyle(fontSize: 30, color: Colors.blue)) + ], + ), + ), + ); + } +} + +``` + +![ezgif com-gif-maker (3)](https://user-images.githubusercontent.com/76723996/136261994-b10c8a68-956b-4228-9edb-ee4306c54aa0.gif) + +## :point_right: OutlinedButton(): + +This allows to create a button with an outline. It takes an `onPressed` and `child` as a required argument. + +- **OutlineButton.icon():** + - It creates an outline button but with an icon in it. It takes an `onPressed` ,`icon` and `label` as required arguments. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'App', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: HomePage(), + ); + } +} + +class HomePage extends StatefulWidget { + @override + State createState() => _HomePageState(); +} + +class _HomePageState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("Outlined Button"), + ), + body: Container( + alignment: Alignment.center, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + OutlinedButton( + child: Text("Click Me"), + onPressed: () {}, + ), + OutlinedButton.icon( + onPressed: () {}, + icon: Icon(Icons.add), + label: Text("Add me"), + ) + ], + ), + ), + ); + } +} + +``` + +![Outlinedbutton](https://user-images.githubusercontent.com/76723996/136262073-b5d1191c-867a-4561-b0e6-e3ff2f820a07.png) + +## :point_right: PopupMenuButton(): + +Popup menu button displays a hovering menu . When you select an item from that menu it the processes mentioned in onSelected will run and the menu closes. It takes in an `itemBuilder` as a required argument. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'App', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: HomePage(), + ); + } +} + +class HomePage extends StatefulWidget { + @override + State createState() => _HomePageState(); +} + +enum Menu { Item1, Item2, Item3 } + +class _HomePageState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("PopupMenu Button"), + actions: [ + PopupMenuButton(itemBuilder: (BuildContext context) { + return >[ + PopupMenuItem( + child: Text("Item1"), + value: Menu.Item1, + ), + PopupMenuItem( + child: Text("Item2"), + value: Menu.Item2, + ), + PopupMenuItem( + child: Text("Item3"), + value: Menu.Item3, + ) + ]; + }) + ], + ), + ); + } +} + +``` + +![ezgif com-gif-maker (4)](https://user-images.githubusercontent.com/76723996/136262229-f3771ccf-25bf-4f36-b7b2-50a1542c788f.gif) + +## :point_right: TextButton(): + +TextButton is used to create a button containing text.We can customise the button by using style property. It takes in `child` and `onPressed`as required arguments. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'App', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: HomePage(), + ); + } +} + +class HomePage extends StatefulWidget { + @override + State createState() => _HomePageState(); +} + + + +class _HomePageState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("Text Button"), + ), + body: Container( + alignment: Alignment.center, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + TextButton( + style: TextButton.styleFrom( + textStyle: const TextStyle(fontSize: 20), + ), + onPressed: null, + child: const Text('Disabled'), + ), + const SizedBox(height: 30), + TextButton( + style: TextButton.styleFrom( + textStyle: const TextStyle(fontSize: 30), + ), + onPressed: () {}, + child: const Text('Enabled'), + ), + ], + ), + ), + ); + } +} + +``` + +![TextButton](https://user-images.githubusercontent.com/76723996/136262296-de449177-ea1c-45f5-ad41-b38db766b56f.png) + +## :point_right: Checkbox(): + +It allows us to create check boxes where users can check/uncheck an item. It takes in `value` and `onChecked` as required argument. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'App', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: HomePage(), + ); + } +} + +class HomePage extends StatefulWidget { + @override + State createState() => _HomePageState(); +} + +bool? boxValue = false;//initializing a boolean value + +class _HomePageState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("Check Box"), + ), + body: Container( + alignment: Alignment.center, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Checkbox( + value: boxValue, + onChanged: (value) { + setState( + () { + boxValue = value; + }, + ); + }, + ), + Text( + "Hello", + style: TextStyle(fontSize: 20), + ) + ], + ), + ), + ); + } +} + +``` + +![ezgif com-gif-maker (5)](https://user-images.githubusercontent.com/76723996/136262407-df3e4331-0070-481a-a041-8b7f27763ae5.gif) + +## :point_right: Date and Time picker: + +- **showDatePicker():** + - This allows us to ceate a date picker . This takes in `context`,`initialDate`,`firstDate`,`lastDate` as required arguments. + +- **showTimePicker():** + - This allows us to ceate a date picker . This takes in `context`,`initialTime` as required arguments. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'App', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: DateTimeApp(), + ); + } +} + +class DateTimeApp extends StatefulWidget { + const DateTimeApp({Key? key}) : super(key: key); + + @override + _DateTimeAppState createState() => _DateTimeAppState(); +} + +class _DateTimeAppState extends State { + DateTime? choosenDate; + TimeOfDay? choosenTime; + + @override + void initState() { + super.initState(); + choosenDate = DateTime.now(); //assigning current date as default value + choosenTime = TimeOfDay.now(); //assigning current time as default value + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("Date Time Picker"), + ), + body: Container( + alignment: Alignment.center, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + "${choosenDate?.day}-${choosenDate?.month}-${choosenDate?.year}", + style: TextStyle(fontSize: 20), + ), + SizedBox( + height: 20, + ), + ElevatedButton( + onPressed: _pickDate, + child: Text("Pick Date", style: TextStyle(fontSize: 20)), + ), + SizedBox( + height: 20, + ), + Text( + "${choosenTime?.hour}:${choosenTime?.minute}", + style: TextStyle(fontSize: 20), + ), + SizedBox( + height: 20, + ), + ElevatedButton( + onPressed: _pickTime, + child: Text("Pick Time", style: TextStyle(fontSize: 20)), + ) + ], + ), + ), + ); + } + + _pickDate() async { + //Creating a function to pick date + DateTime? date = await showDatePicker( + initialDate: choosenDate!, + context: context, + firstDate: DateTime(DateTime.now().year - 5), + lastDate: DateTime( + DateTime.now().year + 5, + ), + ); + if (date != null) { + setState( + () { + choosenDate = date; + }, + ); + } + } + + _pickTime() async { + //Creating a function to pick time + TimeOfDay? time = await showTimePicker( + initialTime: choosenTime!, + context: context, + ); + if (time != null) { + setState( + () { + choosenTime = time; + }, + ); + } + } +} + +``` + +![ezgif com-gif-maker (14)](https://user-images.githubusercontent.com/76723996/136385007-d377933f-8457-40d5-ac4e-5738ca2aac82.gif) + +## :point_right: Radio(): + +Radio() is used to create radio buttons. This type of button is used when the user has to choose only one option out of the given options.This takes in `groupValue` and `onChanged` as required arguments. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'App', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: HomePage(), + ); + } +} + +class HomePage extends StatefulWidget { + @override + State createState() => _HomePageState(); +} + +int _value = 1; + +class _HomePageState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("Radio Button"), + ), + body: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Radio( + value: 1, + groupValue: _value, + onChanged: (value) { + setState(() { + _value = value as int; + }); + }, + ), + Text( + "Item 1", + style: TextStyle(fontSize: 20), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Radio( + value: 2, + groupValue: _value, + onChanged: (value) { + setState(() { + _value = value as int; + }); + }, + ), + Text( + "Item 2", + style: TextStyle(fontSize: 20), + ), + ], + ), + ], + ), + ); + } +} + +``` +![ezgif com-gif-maker (6)](https://user-images.githubusercontent.com/76723996/136262585-a2de3545-0f16-42a9-b55c-2ab199417c00.gif) + +## :point_right: Slider(): + +Slider is a material component widget which is used for selecting a range,example: volume sliders, age slider used in games to set an age . Users can simply set a value by dragging the slider. + +```dart +import 'package:flutter/material.dart'; + + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'App', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: SliderApp(), + ); + } +} + +class SliderApp extends StatefulWidget { + @override + State createState() => _SliderAppState(); +} + +double _sliderValue = 20.0; + +class _SliderAppState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("Slider"), + ), + body: Container( + alignment: Alignment.center, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Slider( + value: _sliderValue, + min: 0.0, + max: 100.0, + divisions: 5, + label: _sliderValue.round().toString(), + onChanged: (double value) { + setState(() { + _sliderValue = value; + }); + }, + ) + ], + ), + ), + ); + } +} + +``` + +![ezgif com-gif-maker (7)](https://user-images.githubusercontent.com/76723996/136262730-ba1066e3-93b3-4acd-8f2d-53a9b5bf322c.gif) + +## :point_right: Switch(): + +Switch is used to toggle between ON/OFF states. This takes in value and `onChanged`as required arguments. + +```dart +import 'package:flutter/material.dart'; + + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'App', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: SwitchToggle(), + ); + } +} + +class SwitchToggle extends StatefulWidget { + const SwitchToggle({Key? key}) : super(key: key); + + @override + _SwitchToggleState createState() => _SwitchToggleState(); +} + +bool _switchvalue = false; + +class _SwitchToggleState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("Switch"), + ), + body: Container( + alignment: Alignment.center, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Switch( + value: _switchvalue, + onChanged: (value) { + setState(() { + _switchvalue = value; + }); + }, + ), + ], + ), + ), + ); + } +} + +``` + +![ezgif com-gif-maker (8)](https://user-images.githubusercontent.com/76723996/136262832-fd61ab0a-0c99-446a-859d-7bf5f45008df.gif) + + +## :point_right: TextField(): + +This widget is commonly used to collect text inputs from user keyboard. This is used when we create a form to collect user data. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'App', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: TextFieldInput(), + ); + } +} + +class TextFieldInput extends StatefulWidget { + const TextFieldInput({Key? key}) : super(key: key); + + @override + _TextFieldInputState createState() => _TextFieldInputState(); +} + +final _controller = TextEditingController(); +String name = ""; + +class _TextFieldInputState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("TextField"), + ), + body: Container( + alignment: Alignment.center, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + padding: EdgeInsets.all(30), + child: TextField( + decoration: InputDecoration( + border: OutlineInputBorder(), + ), + controller: _controller, + onSubmitted: (String value) { + setState(() { + name = value; + }); + }, + ), + ), + name == "" ? Text("Enter name") : Text("Hello $name"), + ], + ), + ), + ); + } +} + +``` + +![ezgif com-gif-maker (9)](https://user-images.githubusercontent.com/76723996/136263004-121cbf6f-f6a2-4b50-bc4a-9a6fbc3bfcc3.gif) + +## :point_right: AlertDialog(): + +Alert dialog is used to let user know if the act that user intended to do is successful . This comes handy in an unexpeced case such as having a problem in fetching data from server. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'App', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: AlertBox(), + ); + } +} + +class AlertBox extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("Alert Dialog"), + ), + body: Container( + alignment: Alignment.center, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + TextButton( + onPressed: () { + alert(context); + }, + child: Text("Show Dialog"), + ), + ], + ), + ), + ); + } +} + +void alert(BuildContext context) { + var alertBox = AlertDialog( + title: Text("Alert!"), + content: Text("Do you want to continue? "), + actions: [ + TextButton( + onPressed: () { + Navigator.of(context).pop(); + }, + child: Text("No"), + ), + TextButton( + onPressed: () { + Navigator.of(context).pop(); + }, + child: Text("Yes"), + ), + ], + ); + showDialog( + context: context, + builder: (BuildContext context) { + return alertBox; + }, + ); +} +``` + +![ezgif com-gif-maker (10)](https://user-images.githubusercontent.com/76723996/136263156-e7848cc9-7a30-4877-9caa-ca37573e308e.gif) + +## :point_right: SnackBar(): + +Snack bar is used to display a simple message popping up from the ottom of the screen which informs the user when an action occur. The message is displayed for a certain amount of time and it disappears automatically. This takes in `content` as a required argument. + +```dart + +import 'package:flutter/material.dart'; + + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'App', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: SnackBarApp(), + ); + } +} + +class SnackBarApp extends StatefulWidget { + const SnackBarApp({Key? key}) : super(key: key); + + @override + _SnackBarAppState createState() => _SnackBarAppState(); +} + +class _SnackBarAppState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("SnackBar"), + ), + body: Container( + alignment: Alignment.center, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + TextButton( + onPressed: () { + showSnackbar(context); + }, + child: Text( + "Show SnackBar", + style: TextStyle(fontSize: 20), + ), + ), + ], + ), + ), + ); + } +} + +void showSnackbar(BuildContext context) { + final snackBar = SnackBar( + content: Text( + "Hello from SnackBar", + style: TextStyle(fontSize: 15), + ), + action: SnackBarAction( + label: "Click Me", + onPressed: () {}, + ), + ); + ScaffoldMessenger.of(context)..showSnackBar(snackBar); +} + +``` + +![ezgif com-gif-maker (12)](https://user-images.githubusercontent.com/76723996/136267694-fab14148-89d3-43f4-80f4-134fdedcd5a6.gif) + +## :point_right: Card(): + +A card is used to display data pertaining to an object in an atractive way giving it rounded corners and with shadown. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'App', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: CardApp(), + ); + } +} + +class CardApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("Card"), + ), + body: Container( + alignment: Alignment.center, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Card( + elevation: 10, + child: Padding( + padding: const EdgeInsets.all(15.0), + child: Column( + children: [ + Text("This is a card", style: TextStyle(fontSize: 20)), + ], + ), + ), + ) + ], + ), + ), + ); + } +} + +``` + +![Card](https://user-images.githubusercontent.com/76723996/136263408-9a8994d0-bf36-46a8-8d68-703e3dcb8e33.png) + +## :point_right: CircularProgressIndicator() and LinearProgressIndicator(): + +CircularProgressIndicator and LinearProgressIndicator are use to display a progress indicator which informs the user about the status of ongoing process and thus keeps the user on hold until the process is completed. +CircularProgressIndicator displays the indicator by displaying a circular spinner wheres the LinearProgressIndicator displays the indicator in the form of a progress bar . + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'App', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: CircularAndLinearProgress(), + ); + } +} + +class CircularAndLinearProgress extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("Circular and Linear progress indicator"), + ), + body: Container( + alignment: Alignment.center, + child: Padding( + padding: const EdgeInsets.all(13.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + LinearProgressIndicator( + valueColor: AlwaysStoppedAnimation(Colors.brown), + backgroundColor: Colors.amber, + ), + SizedBox(height: 30), + CircularProgressIndicator( + valueColor: AlwaysStoppedAnimation(Colors.brown), + backgroundColor: Colors.amber, + ) + ], + ), + ), + ), + ); + } +} + +``` + +![ezgif com-gif-maker (11)](https://user-images.githubusercontent.com/76723996/136267182-a883e45a-b5c9-496a-b0a6-817944d71378.gif) + +## :point_right: Image(): + +This widget is used to render images on the screen. You could either create an assert folder containing images in your project and set the path to these images under `pubspec.yaml` to access these images or you could use a network image. You can access asset images using `Image.asset('Specify path of the image')` and network image using `Image.network('Image url')`. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'App', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: ImageApp(), + ); + } +} + +class ImageApp extends StatefulWidget { + const ImageApp({Key? key}) : super(key: key); + + @override + _ImageAppState createState() => _ImageAppState(); +} + +class _ImageAppState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("Image"), + ), + body: Container( + alignment: Alignment.center, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + // Image.asset("specify image path ") to access images from asset folder + Image.network( + 'https://images.unsplash.com/photo-1497006638916-1021f5d5b02b?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1229&q=80', + height: 400, + width: 400) + ], + ), + ), + ); + } +} + +``` + +![image](https://user-images.githubusercontent.com/76723996/136721415-3da91a7f-fd31-4447-a8a6-88c94648ac72.png) + + :pushpin: To know more about material components click [here](https://flutter.dev/docs/development/ui/widgets/material). diff --git a/Android_Development_With_Flutter/02_Introduction_To_Flutter/flutter.md b/Android_Development_With_Flutter/02_Introduction_To_Flutter/flutter.md new file mode 100644 index 0000000000..13e276fb57 --- /dev/null +++ b/Android_Development_With_Flutter/02_Introduction_To_Flutter/flutter.md @@ -0,0 +1,15 @@ +

90 Days of Flutter : What is Flutter ?

+

+ Flutter logo +

+

Introduction

+

Flutter is a UI toolkit developed by Google and its demands are increasing tremendously. It helps building beautiful, natively compiled applications for mobile, web, desktop, +and embedded devices from a single codebase.This means that your app may appear on screens of many different sizes, from a watch, to a foldable phone with two screens, to a high def monitor.It is specifically designed for the frontend. As such, there is no default backend for a Flutter application.

+

Fast Development :

+

Hot reload = Fast coding,helps fast experiment, build UIs, add features, and fix bugs faster

+

Flexible UI :

+

Create beautiful apps faster with Flutter’s collection of visual, structural, platform, and interactive widgets.Material Design and Cupertino (ios flavour), rich motion API, smooth scroll +and interaction.

+

Native Perfomance :

+

Flutter’s widgets incorporate all critical platform differences such as scrolling, navigation, icons and fonts to provide full native performance on both iOS and Android.

+

🎉 Bravo! Hope you have got an idea of What is Flutter? 🎉 \ No newline at end of file diff --git a/Android_Development_With_Flutter/02_Introduction_To_Flutter/list_and_grid_view.md b/Android_Development_With_Flutter/02_Introduction_To_Flutter/list_and_grid_view.md new file mode 100644 index 0000000000..41316146eb --- /dev/null +++ b/Android_Development_With_Flutter/02_Introduction_To_Flutter/list_and_grid_view.md @@ -0,0 +1,282 @@ + +

List And Grid View

+ + +## :yellow_circle: What is List view ? +List view is a widget which is used to display items such as texts ,icons, labels one below the other in a scrollable view. + +### :point_right: ListView(): +This class can be used when you have a defined amount of items to be displayed such as displaying a menu in settings page. + +#### Syntax: + +```dart +ListView( + children:[ + //Widget items here + ] +) +``` + +```dart +ListView( + children: [ + //If you know the no.of items this is how you can specify. + Container( + height: 300, + width: 300, + color: Colors.grey, + child: Center(child: Text('List 1 ')), + ), + Container( + height: 300, + width: 300, + color: Colors.blue, + child: Center(child: Text('List 2 ')), + ), + Container( + height: 300, + width: 300, + color: Colors.green, + child: Center(child: Text('List 3 ')), + ), + Container( + height: 300, + width: 300, + color: Colors.yellow, + child: Center(child: Text('List 4 ')), + ), + ], + ) +``` + +![ezgif com-gif-maker](https://user-images.githubusercontent.com/76723996/134360201-8cd3e4d3-c713-4bed-b15d-55508565bc17.gif) + +## :point_right: ListView.builder(): +Imagine you have a big (undefined) list of items to be displayed , it is a very tedious process to manually code for such a big list and that's when you use **ListView.builder()** constructor. It takes **itemcount** and **itembuilder** as arguments where you specify the number of items to show in itemcount (also can be a dynamic value) and the widget to be returned or built in itembuilder. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'Views', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: MyHomePage(title: 'ListView.builder()'), + ); + } +} + +class MyHomePage extends StatefulWidget { + MyHomePage({Key? key, required this.title}) : super(key: key); + + final String title; + + @override + _MyHomePageState createState() => _MyHomePageState(); +} + +class _MyHomePageState extends State { + final _items = [ + "India", + "China", + "United States", + "Indonesia", + "Pakistan", + "Brazil", + "Nigeria", + "Russia", + "Mexico", + "Bangladesh", + "Japan", + "Ethiopia" + ]; // this is a dynamic data ,if you add or remove items it will reflect in the UI. + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text(widget.title), + ), + body: ListView.builder( + itemCount: _items + .length, //fetching data dynamically i.e if we change the value in _items it will also change here. + itemBuilder: (context, index) { + return Card( + child: ListTile( + title: Text(_items[index].toString()), + ), + ); + }, + ), + ); + } +} + +``` + +![ezgif com-gif-maker (3)](https://user-images.githubusercontent.com/76723996/134699221-ff530f68-defd-4c56-aef1-5183a3a046cb.gif) + +## :yellow_circle: What is Grid view? +Grid view is a widget which is used to display items such as texts ,icons etc like a grid (row and column manner) and also makes it scrollable. + +### :point_right: GridView.count(): +This is used when you have defined number of data. It takes **crossAxisCount** where you specify the number of columns you want. You can also use **mainAxisSpacing** and **crossAxisSpacing** to give spacing between grids. +#### Syntax: + +```dart +GridView.count( + crossAxisCount://no. of columns + children:[ + //Widget items here + ] +) +``` + +```dart + GridView.count( + crossAxisCount: 2,//no. of columns + mainAxisSpacing: 10,//specifies space between grids horizontally + crossAxisSpacing: 10,//specifies space between vertically + children: [ + //If you know the no.of items this is how you can specify. + Container( + height: 300, + width: 300, + color: Colors.grey, + child: Center(child: Text('Grid 1 ')), + ), + Container( + height: 300, + width: 300, + color: Colors.blue, + child: Center(child: Text('Grid 2 ')), + ), + Container( + height: 300, + width: 300, + color: Colors.green, + child: Center(child: Text('Grid 3 ')), + ), + Container( + height: 300, + width: 300, + color: Colors.yellow, + child: Center(child: Text('Grid 4 ')), + ), + Container( + height: 300, + width: 300, + color: Colors.orange, + child: Center(child: Text('Grid 5 ')), + ), + Container( + height: 300, + width: 300, + color: Colors.pink, + child: Center(child: Text('Grid 6')), + ), + Container( + height: 300, + width: 300, + color: Colors.purple, + child: Center(child: Text('Grid 7')), + ), + Container( + height: 300, + width: 300, + color: Colors.lightBlue, + child: Center(child: Text('Grid 8')), + ), + ], + ) +``` + + + + +![ezgif com-gif-maker (4)](https://user-images.githubusercontent.com/76723996/134703681-a2c2abd9-ae97-4bb9-8f4e-1e06f3fd9c87.gif) + +## :point_right:GridView.builder(): +This is used when you want to display a grid of dynamic data . It takes **itemcount** where you specify the number of items you want to display, **gridDelegate** where you mention the number of columns and **itemBuilder** to return a widget. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'Views', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: MyHomePage(title: 'GridView.builder()'), + ); + } +} + +class MyHomePage extends StatefulWidget { + MyHomePage({Key? key, required this.title}) : super(key: key); + + final String title; + + @override + _MyHomePageState createState() => _MyHomePageState(); +} + +class _MyHomePageState extends State { + final _items = [ + "India", + "China", + "United States", + "Indonesia", + "Pakistan", + "Brazil", + "Nigeria", + "Russia", + "Mexico", + "Bangladesh", + "Japan", + "Ethiopia" + ]; // this is a dynamic data ,if you add or remove items it will reflect in the UI. + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text(widget.title), + ), + body: GridView.builder( + itemCount: _items + .length, //fetching data dynamically i.e if we change the value in _items it will also change here. + gridDelegate: + SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2), + itemBuilder: (context, index) { + return Card( + child: ListTile( + title: Text(_items[index].toString()), + ), + ); + }, + ), + ); + } +} + + +``` +![ezgif com-gif-maker (2)](https://user-images.githubusercontent.com/76723996/134668346-61520cd0-540e-49a6-88fa-384961922db7.gif) + + + diff --git a/Android_Development_With_Flutter/02_Introduction_To_Flutter_Video/Flutter-logo.jpg b/Android_Development_With_Flutter/02_Introduction_To_Flutter_Video/Flutter-logo.jpg new file mode 100644 index 0000000000..e214d686f4 Binary files /dev/null and b/Android_Development_With_Flutter/02_Introduction_To_Flutter_Video/Flutter-logo.jpg differ diff --git a/Android_Development_With_Flutter/02_Introduction_To_Flutter_Video/readme.md b/Android_Development_With_Flutter/02_Introduction_To_Flutter_Video/readme.md new file mode 100644 index 0000000000..70e0b506a7 --- /dev/null +++ b/Android_Development_With_Flutter/02_Introduction_To_Flutter_Video/readme.md @@ -0,0 +1,5 @@ +# Intoduction To Flutter + +[The Video](https://youtu.be/X5BXBnwuoPQ) + +![Flutter Logo](https://github.com/iamayushkr/winter-of-contributing/blob/Android_Development_With_Flutter/Android_Development/Flutter/Flutter_Introduction_Video/Flutter-logo.jpg) diff --git a/Android_Development_With_Flutter/03_Why_To_Use_Flutter/Why_use_Flutter.md b/Android_Development_With_Flutter/03_Why_To_Use_Flutter/Why_use_Flutter.md new file mode 100644 index 0000000000..01c5ea13e0 --- /dev/null +++ b/Android_Development_With_Flutter/03_Why_To_Use_Flutter/Why_use_Flutter.md @@ -0,0 +1,42 @@ +

Flutter: Why to use Flutter ?

+

+ Flutter logo +

+

Now that you have understood what Flutter is, you must be curious as to why use Flutter for making Apps when there are other options available too.The major reason for this is the benefits it offers

+

Benefits of using Flutter for App Development +

+

- Flutter apps are budget friendly

+

Apps developed using Flutter are build in lesser time due to their ease, and thus they are not as expensive as native apps are. It is perfect for startups where you need to test your business model fast.Flutter app development cost will be lower compared to native development for two platforms

+

- Development takes place faster

+

Flutter lets programmers use a single codebase, unify their teams, reduce risk, and speed time-to-market. All while getting the benefits of native app look and performance.

+

- The Hot Reload feature

+

One of the main feature of Flutter which makes it a favourite among developers is a killer feature called Hot Reload. When a developer clicks the reload button, all code changes are instantly displayed on gadgets, emulators, and simulators. + +If programmers change some code in the apps made using Flutter after the recompile, they don't have to navigate back or manually recreate the state to see what changed. + +Hot Reload gives Flutter devs the ability to deliver more features in less time. Plus makes it easier to continue adding new features frequently. +Flutter logo +

+

- Native-like Performance

+

In terms of performance, Flutter = native real-time app. +The framework aims to provide 60 fps performance or 120 fps performance on devices capable of 120Hz updates. Apps made in Flutter don't need a bridge to interact with native components (which affects performance) as other frameworks do.

+

Why to use it over traditional android and ios development? +

+

+ Flutter logo +

+

Being a dynamic, cross-platform development framework, it can enrich your app with multiple characteristics and ensure faster development process with engaging User-Interface. Also, its tagline “Build Beautiful Native Apps in Record Time” is the definite highlight of its advantages and capabilities to develop cross-platform apps for iOS and Android using a single codebase. + +Despite being the newest member of the cross-platform mobile app development community, Flutter is fastly leaving behind the other frameworks and providing better opportunities to build a feature-rich business mobile app.

+ +

Which language does Flutter use? +

+

+ +

+

Flutter UIs are built with an imperative, object-oriented language-Dart;the same language used to build Flutter's framework. + +Dart is a client-optimized language for developing fast apps on any platform. Its goal is to offer the most productive programming language for multi-platform development, paired with a flexible execution runtime platform for app frameworks. +

+ + diff --git a/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/How to install and setup Flutter.md b/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/How to install and setup Flutter.md new file mode 100644 index 0000000000..6805079503 --- /dev/null +++ b/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/How to install and setup Flutter.md @@ -0,0 +1,78 @@ +# How to install and setup Flutter + + + + + +Google's Flutter is an open-source user interface software development kit. From a single codebase, it is possible to create apps for Android, iOS, Linux, Mac, Windows, Google Fuchsia, and the web. Flutter is merely a framework that makes use of the "DART" programming language to deploy code. Dart allows us to construct something for myself and others using a declarative approach. + +## System Requirements — + +1. Operating system -Windows 7 or later + +2. Disk space -400 MB + + ## Setup instructions for flutter + + ### 1. Download the flutter SDK + + i) *download Flutter from* https://flutter.dev/docs/get-started/install/windows + + + + -Press the ‘flutter_windows_2.5.0-stable.zip’ button and then we will get a Zip file and flutter recommends to extract in C Drive. + + + + After installation of flutter go to "Environment Variables" and update your PATH variable. + + + + In the above picture, just click on "PATH"and then "EDIT" + + + + + + Now go to the location where flutter was extracted and copy the Flutter bin files location. + + + + Now click on New and paste the location of your Flutter bin files.— + eg.-D:\flutterinstallation\flutter\bin + + + + Now to make sure that our flutter is running, search for ‘command prompt’. Type in -'flutter --version' and press enter. + + + + Hence, our Flutter is running successfully. + + ## 2.Install Android Studio + + **Windows requirements :** + + - 3 GB RAM minimum, 8 GB RAM recommended + - 1 GB RAM for the Android Emulator + - 2 GB of available disk space minimum, 4 GB recommended (500 MB for IDE plus 1.5 GB for Android SDK and emulator system image). + + download the android studio from https://developer.android.com/studio + + After downloading Android studio Install it and Keep on clicking next and at last finish. + + + + + + + +When you launch Android Studio, you'll get a screen that looks like the one below. Click on — Configure >> Settings + + + + + +Now in Settings, go to **Plugins** and search for **“Flutter”**. Install the first option — Flutter and this will bring up a pop-up window asking if you want to install Dart as well. Select ‘yes' to continue. When the plugin installation is complete, Android Studio may need to be restarted. + +We've completed the installation and configuration of our Flutter programming environment. You can now test your first app! diff --git a/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/README.md b/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/README.md new file mode 100644 index 0000000000..aa84b041ce --- /dev/null +++ b/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/README.md @@ -0,0 +1 @@ +# Flutter \ No newline at end of file diff --git a/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image1.png b/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image1.png new file mode 100644 index 0000000000..16f5094788 Binary files /dev/null and b/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image1.png differ diff --git a/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image10.png b/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image10.png new file mode 100644 index 0000000000..22758a3cc2 Binary files /dev/null and b/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image10.png differ diff --git a/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image11.png b/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image11.png new file mode 100644 index 0000000000..1c05926db3 Binary files /dev/null and b/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image11.png differ diff --git a/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image2.png b/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image2.png new file mode 100644 index 0000000000..90a8a1aea7 Binary files /dev/null and b/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image2.png differ diff --git a/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image3.png b/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image3.png new file mode 100644 index 0000000000..b32f1d1dea Binary files /dev/null and b/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image3.png differ diff --git a/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image4.png b/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image4.png new file mode 100644 index 0000000000..47d25d84e0 Binary files /dev/null and b/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image4.png differ diff --git a/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image5.png b/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image5.png new file mode 100644 index 0000000000..9f2ade392d Binary files /dev/null and b/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image5.png differ diff --git a/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image6.png b/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image6.png new file mode 100644 index 0000000000..3997d88b06 Binary files /dev/null and b/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image6.png differ diff --git a/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image7.png b/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image7.png new file mode 100644 index 0000000000..40357268ed Binary files /dev/null and b/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image7.png differ diff --git a/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image8.png b/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image8.png new file mode 100644 index 0000000000..59aff67d3e Binary files /dev/null and b/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image8.png differ diff --git a/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image9.png b/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image9.png new file mode 100644 index 0000000000..c8e04635d4 Binary files /dev/null and b/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio/image9.png differ diff --git a/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio_Video/Flutter-Installation and setup Android Studio.md b/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio_Video/Flutter-Installation and setup Android Studio.md new file mode 100644 index 0000000000..0fa709f3c7 --- /dev/null +++ b/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio_Video/Flutter-Installation and setup Android Studio.md @@ -0,0 +1,3 @@ +# Flutter: Installation and setup Android Studio + +To install flutter and set up android studio on your device, click on the link and follow the instructions: [How to install flutter and set up android studio](https://youtu.be/GsB0Tx4iqgg). \ No newline at end of file diff --git a/Android_Development_With_Flutter/04_Flutter_Installation/02_Setup_Flutter_with_VS_Code_Video/Setup_Flutter_&_VS_Code.md b/Android_Development_With_Flutter/04_Flutter_Installation/02_Setup_Flutter_with_VS_Code_Video/Setup_Flutter_&_VS_Code.md new file mode 100644 index 0000000000..edb6e4dada --- /dev/null +++ b/Android_Development_With_Flutter/04_Flutter_Installation/02_Setup_Flutter_with_VS_Code_Video/Setup_Flutter_&_VS_Code.md @@ -0,0 +1,20 @@ +# Installation of Flutter in Windows and Mac OS + +

+Flutter-logo +

+ +## Pre-requisites + +* Android Studio must be installed, check issue #711 to install it +* Official [Flutter Docs](https://flutter.dev/docs/get-started/install) website +* Download [VS code](https://code.visualstudio.com/) + +

+ +## Watch this [video](https://youtu.be/Fi9lnrZu0mE) or click the image below to watch the installation tutorial + +[](https://youtu.be/Fi9lnrZu0mE) + +

diff --git a/Android_Development_With_Flutter/04_Flutter_Installation/02_Setup_Flutter_with_VS_Code_Video/images/img1.jpg b/Android_Development_With_Flutter/04_Flutter_Installation/02_Setup_Flutter_with_VS_Code_Video/images/img1.jpg new file mode 100644 index 0000000000..28f3b49247 Binary files /dev/null and b/Android_Development_With_Flutter/04_Flutter_Installation/02_Setup_Flutter_with_VS_Code_Video/images/img1.jpg differ diff --git a/Android_Development_With_Flutter/04_Flutter_Installation/02_Setup_Flutter_with_VS_Code_Video/images/img2.gif b/Android_Development_With_Flutter/04_Flutter_Installation/02_Setup_Flutter_with_VS_Code_Video/images/img2.gif new file mode 100644 index 0000000000..37f9a124ce Binary files /dev/null and b/Android_Development_With_Flutter/04_Flutter_Installation/02_Setup_Flutter_with_VS_Code_Video/images/img2.gif differ diff --git a/Android_Development_With_Flutter/05_Flutter_Widgets/01_Introduction_To_Widgets _Video/readme.md b/Android_Development_With_Flutter/05_Flutter_Widgets/01_Introduction_To_Widgets _Video/readme.md new file mode 100644 index 0000000000..62764029a7 --- /dev/null +++ b/Android_Development_With_Flutter/05_Flutter_Widgets/01_Introduction_To_Widgets _Video/readme.md @@ -0,0 +1,7 @@ + + +# Flutter : Basics of Widgets - Video + +### In this video I have explained what are widgets in flutter? and some basic examples of widgets such as Scaffold,Container,Row,Column,AppBar,Text. + +[Video link](https://watch.screencastify.com/v/mfujngn15EVx8vOC96bI) diff --git a/Android_Development_With_Flutter/05_Flutter_Widgets/01_Introduction_To_Widgets/flutter_Widgets.md b/Android_Development_With_Flutter/05_Flutter_Widgets/01_Introduction_To_Widgets/flutter_Widgets.md new file mode 100644 index 0000000000..75643227d9 --- /dev/null +++ b/Android_Development_With_Flutter/05_Flutter_Widgets/01_Introduction_To_Widgets/flutter_Widgets.md @@ -0,0 +1,180 @@ +# **Introduction to Flutter Widgets** +Widgets are everything in Flutter framework.Flutter is Google’s UI toolkit for crafting beautiful, natively compiled iOS and Android apps from a single code base. To build any application we start with widgets – The building block of flutter applications. Widgets describe what their view should look like given their current configuration and state. It includes a text widget, row widget, column widget, container widget, and many more. + + Widgets describe what their view should look like given their current configuration and state. When a widget’s state changes, the widget rebuilds its description, which the framework diffs against the previous description in order to determine the minimal changes needed in the underlying render tree to transition from one state to the next. + + + +#**What are Widgets ?** + + Each element on a screen of the Flutter app is a widget. The view of the screen completely depends upon the choice and sequence of the widgets used to build the app. And the structure of the code of an app is a tree of widgets. + +Widgets are nested with each other to build the app. It means the root of your app is itself a widget, and all the way down is a widget also. For example, a widget can display something, can define design, can handle interaction, etc. + +So, Whenever you are going to code for building anything in Flutter, it will be inside a widget. The central purpose is to build the app out of widgets. It describes how your app view should look like with their current configuration and state. When you made any alteration in the code, the widget rebuilds its description by calculating the difference of previous and current widget to determine the minimal changes for rendering in UI of the app. + +### ***Widget is a description of a part of UI.*** +1.In flutter, Widget is a way to declare and construct UI. + +2.If you are familiar with the Android or iOS development then you might make the immediate connection with the views (on Android) or UIViews (on iOS). +But dear just like view, Widget is not just a piece of UI. Widget is a lot more than just structural elements like buttons, text, image, list or slider. + +3.A widget might display Something, it might help define design, it might help with layout, it may handle user interaction, etc. +For example, Padding is a widget, Margin is a widget, Center is a widget, Layout rows and columns are also widgets. +So you can consider that a widget is a blueprint. Flutter uses these blueprints to create views. +Here also remember that in flutter everything is a widget. Even your app itself is a widget. + +## **Types of Widgets** + +There are broadly two types of widgets in the flutter: + +1. Stateless Widget +2. Stateful Widget + + +# **Stateless Widget** +*A widget that does not require mutable state.* + +A stateless widget is a widget that describes part of the user interface by building a constellation of other widgets that describe the user interface more concretely. The building process continues recursively until the description of the user interface is fully concrete. + +In simple words, if a widget doesn’t do anything its Stateless Widget. They are static in nature. +Stateless widgets don’t store any state. That means they don’t store values that might change. +You can also say that stateless widgets are “DATALESS” widgets. As they don’t store any real-time data. + + +For example, if you have a simple Text widget on the screen, but it doesn’t do anything then its Stateless Widget. +Icon, IconButton, and Text are an example of stateless widgets. + +Stateless widget are useful when the part of the user interface you are describing does not depend on anything other than the configuration information in the object itself and the BuildContext in which the widget is inflated. For compositions that can change dynamically, e.g. due to having an internal clock-driven state, or depending on some system state, consider using StatefulWidget. + +###**A StateLess Widget looks like this** + + +``` +class Car extends StatelessWidget { + const Car({ Key key }) : super(key: key); + + @override + Widget build(BuildContext context) { + return Container(color: const Color(0xFF2DBD3A)); + } +} +``` + + + + + + + + + + + + + +# **Stateful Widget** +*A widget that has mutable state* + +A stateful widget is a widget that describes part of the user interface by building a constellation of other widgets that describe the user interface more concretely. The building process continues recursively until the description of the user interface is fully concrete. + +In simple words, if a widget does anything then its Stateful Widget. +A Stateful widget is dynamic in nature. That means it can keep track of changes and update the UI based on those changes. +The user can interact with a stateful widget. + + For example, If you press a button and it performs any task its a Stateful Widget, If you are moving a slider and it does anything then its a Stateful Widget, If you swipe item from a list and item gets deleted then that list a Stateful Widget. +CheckBox, Radio, Slider, InkWell, Form, and TextField are an example of stateful widgets. + + +Stateful widgets are useful when the part of the user interface you are describing can change dynamically, e.g. due to having an internal clock-driven state, or depending on some system state. + +### A StateFul Widget look like this + +``` +class BlueCar extends StatefulWidget { + const BlueCar({ Key key, @required child }) : super(key: key); // Constructor + + @override + _BlueCarState createState() => _BlueCarState(); +} + +class _BlueCarState extends State { + @override + Widget build(BuildContext context) { + return Container( + color: const Color(0xFFFFE306), + child: Container( + child: Container( + //child: Container() + ) + ) + + ); + + } +} +``` + +## **Category of Widgets**: +There are mainly 14 categories in which the flutter widgets are divided. They are mainly segregated on the basis of the functionality they provide in a flutter application. + +**Accessibilit**y: These are the set of widgets that make a flutter app more easily accessible. + + +**Animation and Motion**: These widgets add animation to other widgets. + + +**Assets, Images, and Icons**: These widgets take charge of assets such as display images and show icons. + + +**Async**:These provide async functionality in the flutter application. +Basics: These are the bundle of widgets which are absolutely necessary for the development of any flutter application. + +**Cupertino:** These are the ios designed widgets. + +**Input**: This set of widgets provide input functionality in a flutter application. + + +**Interaction Models**: These widgets are here to manage touch events and route users to different views in the application. + + + **Layout**: This bundle of widgets helps in placing the other widgets on the screen as needed. + + +**Material Components**: This is a set of widgets that mainly follow material design by Google. + + +**Painting and effects**: This is the set of widgets which apply visual changes to their child widgets without changing their layout or shape. + + +**Scrolling**: This provides sacrollability of to a set of other widgets that are not scrollable by default. + + +**Styling**: This deals with the theme, responsiveness, and sizing of the app. + +**Text**: This displays the texts. + + + + + + +## **Layout widgets** +In Flutter, a widget can be created by composing one or more widgets. To compose multiple widgets into a single widget, Flutter provides large number of widgets with layout feature. For example, the child widget can be centered using Center widget. + +Some of the popular layout widgets are as follows − + +**Container** − A rectangular box decorated using BoxDecoration widgets with background, border and shadow. + +**Center** − Center its child widget. + +**Row** − Arrange its children in the horizontal direction. + +**Column** − Arrange its children in the vertical direction. + +**Stack** − Arrange one above the another + + + +To read more about widgets,Please follow [this](https://flutter.dev/docs/development/ui/widgets-intro). +""" diff --git a/Android_Development_With_Flutter/05_Flutter_Widgets/02_Introduction_To_Widgets_Part-2/assets/axes.jpg b/Android_Development_With_Flutter/05_Flutter_Widgets/02_Introduction_To_Widgets_Part-2/assets/axes.jpg new file mode 100644 index 0000000000..a9acf13897 Binary files /dev/null and b/Android_Development_With_Flutter/05_Flutter_Widgets/02_Introduction_To_Widgets_Part-2/assets/axes.jpg differ diff --git a/Android_Development_With_Flutter/05_Flutter_Widgets/02_Introduction_To_Widgets_Part-2/assets/rc.png b/Android_Development_With_Flutter/05_Flutter_Widgets/02_Introduction_To_Widgets_Part-2/assets/rc.png new file mode 100644 index 0000000000..af797d06ae Binary files /dev/null and b/Android_Development_With_Flutter/05_Flutter_Widgets/02_Introduction_To_Widgets_Part-2/assets/rc.png differ diff --git a/Android_Development_With_Flutter/05_Flutter_Widgets/02_Introduction_To_Widgets_Part-2/assets/stack_cont.png b/Android_Development_With_Flutter/05_Flutter_Widgets/02_Introduction_To_Widgets_Part-2/assets/stack_cont.png new file mode 100644 index 0000000000..9fe1c4be84 Binary files /dev/null and b/Android_Development_With_Flutter/05_Flutter_Widgets/02_Introduction_To_Widgets_Part-2/assets/stack_cont.png differ diff --git a/Android_Development_With_Flutter/05_Flutter_Widgets/02_Introduction_To_Widgets_Part-2/basic_widgets.md b/Android_Development_With_Flutter/05_Flutter_Widgets/02_Introduction_To_Widgets_Part-2/basic_widgets.md new file mode 100644 index 0000000000..4995071e0f --- /dev/null +++ b/Android_Development_With_Flutter/05_Flutter_Widgets/02_Introduction_To_Widgets_Part-2/basic_widgets.md @@ -0,0 +1,235 @@ +# Basic widgets used in Flutter +Let's take a look at some of the basic widgets used in flutter. +# Text +The text widget in Flutter is used to display a string. +Some of the basic properties used in the text widget include: +1. style: It expects a TextStyle object, we can control the font size, color , weight etc +2. textAlign: Expects an object of the TextAlign class, it is used to align the text widget. + +### Example: +```dart +//This is a Text Widget +Text("This is a text Widget", + //We have set the color of the text to be blue and set the size of the + //font to 20.0 units + style: TextStyle(color: Colors.blue,fontSize: 20.0), + //This property aligns the text to the center. + textAlign: TextAlign.center, + ) +``` + + +# Row, Column +### Row +A row widget, aligns all of its children widgets in a horizontal row. These widgets, must be nested within the row widget's children property. +### Column +A column widget is similar to the row widget, but it aligns the children widgets in a vertical column. + +Let us take a look at some of the basic properties available in both Row and column widgets. +1. children: This property expects a list of widgets. +2. mainAxisAlignment: This property expects the MainAxisAlignment enum object. This will determine the alignment of the widgets along the main axis. For the **row** widget, the main axis is along the **horizontal** direction, and for **column** it is along the **vertical** direction. +3. crossAxisAlignment: This property expects the CrossAxisAlignment enum object. This will determine the alignment of the widgets along the cross axis. For the **row** widget, the cross axis is along the **vertical** direction, and for the **column** it is along the **horizontal** direction. + +Refer the image below to get an even clear understanding of the main and cross axes. +![](./assets/axes.jpg) +(Image credit [FlutterFix](https://flutterfix.com/difference-between-the-flutter-crossaxisalignment-and-mainaxisalignment/)) + +# Stack +The stack widget stacks its children widgets on top of each other and helps in overlapping the widgets. This can be useful in a variety of situations, like overlaying an image on top of another widget. + +Some of the basic properties of stack are: +1. children: It expects a list of widgets, like Row and Column widgets. +2. alignment: This property can be used to specify the alignment of the stacked widgets + +# Container +The Container class in flutter is a handy widget. It combines painting, positioning, and sizing of widgets. The Container class can be used to contain multiple widgets and place them on the screen as we see fit. + +Some basic properties used with the container widget are: +1. height: Used to set the height of the container. +2. widht: Used to set the width of the container. +3. decoration: As the name suggests, with this property one can decorate the container +4. child: Expects a widget to be contained within the container. + +Let us take a look at an example that combines both container and stack widgets. + + +# Implementation: +Let us take a look at these widgets in action. + +### Example 1: Row and Column widgets with the Container widget +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + // This widget is the root of your application. + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'Flutter Demo', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: MyHomePage(title: 'Flutter Demo Home Page'), + ); + } +} + +class MyHomePage extends StatefulWidget { + MyHomePage({Key? key, required this.title}) : super(key: key); + + final String title; + + @override + _MyHomePageState createState() => _MyHomePageState(); +} + +class _MyHomePageState extends State { + int _counter = 0; + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar(title: Text("Basic Widgets"),), + //Here we have an outer column, that has four widgets inside it. A row and a column + //and two sized boxes for spacing the other two widgets + body: Column( + children: [ + //SizedBox is added to have a space between the row widget and the app bar. + SizedBox(height: 30,), + Row( + //We have used MainAxisAlignment.center, to center the children widgets along the main axis. + mainAxisAlignment: MainAxisAlignment.center, + children: [ + //The children of this row widget are three container widgets with height and width set with respect to the screen and different colors. + Container( + //Mediaquery is used to set the dimensions with respect to the screen dimensions. + // Here the containers have a height and width that is equal to 1/4th the + //screen's height and width + height: MediaQuery.of(context).size.height/4, + width: MediaQuery.of(context).size.width/4, + decoration: BoxDecoration(color: Colors.red), + ), + Container( + height: MediaQuery.of(context).size.height/4, + width: MediaQuery.of(context).size.width/4, + decoration: BoxDecoration(color: Colors.green), + ), + Container( + height: MediaQuery.of(context).size.height/4, + width: MediaQuery.of(context).size.width/4, + decoration: BoxDecoration(color: Colors.blue), + ) + ], + ), + SizedBox(height: 30,), + //This is the column widget It also has three container widgets as children. + Column( + children: [ + Container( + height: MediaQuery.of(context).size.height/6, + width: MediaQuery.of(context).size.width/1.35, + decoration: BoxDecoration(color: Colors.pink), + ), + Container( + height: MediaQuery.of(context).size.height/6, + width: MediaQuery.of(context).size.width/1.35, + decoration: BoxDecoration(color: Colors.deepPurpleAccent), + ), + Container( + height: MediaQuery.of(context).size.height/6, + width: MediaQuery.of(context).size.width/1.35, + decoration: BoxDecoration(color: Colors.blueAccent), + ) + ], + ) + ], + ), + ); + } +} +``` +The above code results in the following output, + + + +### Example 2 : Stack widget with the Container widget: + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + // This widget is the root of your application. + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'Flutter Demo', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: MyHomePage(title: 'Flutter Demo Home Page'), + ); + } +} + +class MyHomePage extends StatefulWidget { + MyHomePage({Key? key, required this.title}) : super(key: key); + + final String title; + + @override + _MyHomePageState createState() => _MyHomePageState(); +} + +class _MyHomePageState extends State { + int _counter = 0; + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar(title: Text("Basic Widgets"),), + body: Stack( + //alignment property is used to align all the elements of the stack to the center of the stack widget. + alignment: Alignment.center, + children: [ + //The container widget with specified height, width and color. These widgets are stacked on top of each other. + Container( + //Mediaquery is used to set the dimensions with respect to the screen dimensions. Here for the first container the height and width are set to half of the screen's height and width. + height: MediaQuery.of(context).size.height/2, + width: MediaQuery.of(context).size.width/2, + //We have decorated this container to be black in color. + decoration: BoxDecoration(color: Colors.black), + ), + Container( + height: MediaQuery.of(context).size.height/3, + width: MediaQuery.of(context).size.width/3, + decoration: BoxDecoration(color: Colors.yellow), + ), + Container( + height: MediaQuery.of(context).size.height/4, + width: MediaQuery.of(context).size.width/4, + decoration: BoxDecoration(color: Colors.blue), + ) + ], + ), + ); + } +} +``` + +This code renders the following output: + + + +# Additional Resources: +To know more about these basic widgets, refer the following resources +1. Use these links to know more about the [Text](https://yashodgayashan.medium.com/flutter-text-widget-14199321155f) widget, [Row and column](https://www.geeksforgeeks.org/row-and-column-widgets-in-flutter-with-example/) widgets +2. To learn more about stack (and indexed stack) refer this [article](https://medium.com/flutter-community/a-deep-dive-into-stack-in-flutter-3264619b3a77) +3. To know more about the container widget, go to this [article](https://api.flutter.dev/flutter/widgets/Container-class.html) \ No newline at end of file diff --git a/Android_Development_With_Flutter/05_Flutter_Widgets/02_Introduction_To_Widgets_Part-2/statefulwidget.md b/Android_Development_With_Flutter/05_Flutter_Widgets/02_Introduction_To_Widgets_Part-2/statefulwidget.md new file mode 100644 index 0000000000..087ed04fd7 --- /dev/null +++ b/Android_Development_With_Flutter/05_Flutter_Widgets/02_Introduction_To_Widgets_Part-2/statefulwidget.md @@ -0,0 +1,34 @@ +## Stateful Widgets +#### What is Stateful Widget ? +State is information that can be read synchronously when the widget is built and might change during the lifetime of the widget. + Stateful Widgets are dynamic widgets,i.e.mutable state,describes part of the user interface,can change dynamically.StatefulWidget instances + themselves are immutable and store their mutable state either in separate State objects that are created by the createState method to which references are stored in + final fields on the StatefulWidget itself.**If we create a button widget that updates itself each time a user clicks that button, that is a stateful widget.** + #### Use of Stateful Widget : + +1. UI can change dynamically. +2. Change multiple times with different sets of variables, inputs, data. +3. Checkboxes, radio buttons, and sliders +#### Syntax : + ```dart + import 'package:flutter/material.dart'; + +void main() => runApp(MyApp()); + +class MyApp extends StatefulWidget { +@override +_MyAppState createState() => _MyAppState(); +} + +class _MyAppState extends State { +@override +Widget build(BuildContext context) { + return Container(); +} +} +``` +#### Keyword Description : +1. import - importing the package +2. runApp() - function takes the given Widget and makes it the root of the widget tree +3. MyApp - Class name +4. extends - inherit from or extend a class using the extends keyword \ No newline at end of file diff --git a/Android_Development_With_Flutter/05_Flutter_Widgets/02_Introduction_To_Widgets_Part-2/stateless.md b/Android_Development_With_Flutter/05_Flutter_Widgets/02_Introduction_To_Widgets_Part-2/stateless.md new file mode 100644 index 0000000000..9f20684d1b --- /dev/null +++ b/Android_Development_With_Flutter/05_Flutter_Widgets/02_Introduction_To_Widgets_Part-2/stateless.md @@ -0,0 +1,25 @@ +### Stateless Widgets +#### What is Stateless Widget ? +State is information that can be read synchronously when the widget is built and might change during the lifetime of the widget.The widgets whose state can not be changed or rendered when they are built are called stateless widgets.which is immutable **Eg: Icon Widget where icon won't changes its state** +#### Use of Stateless Widget : + - The widgets remain the same while build. + - Stateless Widgets will be like immutable state which builds the UI State of the App. +#### Syntax : +```dart +import 'package:flutter/material.dart'; + +void main() => runApp(MyApp()); + +class MyApp extends StatelessWidget{ +@override +Widget build(BuildContext context) { + return Container(); +} +} +``` +#### Keyword Description : + +1. MyApp - name of stateless Widget +2. build(BuildContext context) - It is overridden function , is used to locate the widget inside the widget tree +3. Container() - Widget + diff --git a/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/01/Screenshot_1633255092.png b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/01/Screenshot_1633255092.png new file mode 100644 index 0000000000..1c3edddeff Binary files /dev/null and b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/01/Screenshot_1633255092.png differ diff --git a/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/02/Screenshot_1633255235.png b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/02/Screenshot_1633255235.png new file mode 100644 index 0000000000..336b1d93d4 Binary files /dev/null and b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/02/Screenshot_1633255235.png differ diff --git a/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/03/Screenshot_1633255337.png b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/03/Screenshot_1633255337.png new file mode 100644 index 0000000000..99a635d425 Binary files /dev/null and b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/03/Screenshot_1633255337.png differ diff --git a/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/04/Screenshot_1633255392.png b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/04/Screenshot_1633255392.png new file mode 100644 index 0000000000..25a4071ca8 Binary files /dev/null and b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/04/Screenshot_1633255392.png differ diff --git a/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/05/Screenshot_1633255471.png b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/05/Screenshot_1633255471.png new file mode 100644 index 0000000000..a7f8c8e925 Binary files /dev/null and b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/05/Screenshot_1633255471.png differ diff --git a/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/06/Screenshot_1633255540.png b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/06/Screenshot_1633255540.png new file mode 100644 index 0000000000..d780fe91e6 Binary files /dev/null and b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/06/Screenshot_1633255540.png differ diff --git a/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/07/Screenshot_1633255618.png b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/07/Screenshot_1633255618.png new file mode 100644 index 0000000000..2a1fe81bee Binary files /dev/null and b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/07/Screenshot_1633255618.png differ diff --git a/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/08/Screenshot_1633255675.png b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/08/Screenshot_1633255675.png new file mode 100644 index 0000000000..4c702d16d3 Binary files /dev/null and b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/08/Screenshot_1633255675.png differ diff --git a/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/09/Screenshot_1633255783.png b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/09/Screenshot_1633255783.png new file mode 100644 index 0000000000..c182d9871a Binary files /dev/null and b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/09/Screenshot_1633255783.png differ diff --git a/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/10/Screenshot_1633255845.png b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/10/Screenshot_1633255845.png new file mode 100644 index 0000000000..e409383b42 Binary files /dev/null and b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/10/Screenshot_1633255845.png differ diff --git a/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/11/Screenshot_1633255936.png b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/11/Screenshot_1633255936.png new file mode 100644 index 0000000000..c398b234ce Binary files /dev/null and b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/11/Screenshot_1633255936.png differ diff --git a/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/12/Screenshot_1633256041.png b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/12/Screenshot_1633256041.png new file mode 100644 index 0000000000..b7378c6ade Binary files /dev/null and b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/12/Screenshot_1633256041.png differ diff --git a/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/13/Screenshot_1633256126.png b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/13/Screenshot_1633256126.png new file mode 100644 index 0000000000..665e14f47b Binary files /dev/null and b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/13/Screenshot_1633256126.png differ diff --git a/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/14/Screenshot_1633256235.png b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/14/Screenshot_1633256235.png new file mode 100644 index 0000000000..48cfe21e90 Binary files /dev/null and b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/14/Screenshot_1633256235.png differ diff --git a/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/15/Screenshot_1633256497.png b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/15/Screenshot_1633256497.png new file mode 100644 index 0000000000..32bf93768c Binary files /dev/null and b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/Assets/15/Screenshot_1633256497.png differ diff --git a/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/readme.md b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/readme.md new file mode 100644 index 0000000000..bf2f842372 --- /dev/null +++ b/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/readme.md @@ -0,0 +1,768 @@ +# How to use Column and Row Widgets for Layout + +It's all very well and good using a container to layout a single widget, such as a piece of text or an image. And we can define its padding, its margin, its size, its background colour etc... But what if you had lots of different things that you want to lay out? + +In that case, you need something that can take lots of child, and not just a single one. And the easiest way to do this is using columns and rows so that we can lay out our widgets in a vertical direction or a horizontal direction, and determine how they should be sized. **_Rows go horizontal, columns will go vertical_**. + +Let's go ahead and create a column of our own. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + backgroundColor: Colors.white70, + body: SafeArea( + child: Column( + children: [ + Container( + height: 100.0, + width:100.0, + child: Text("Container 1"), + color: Colors.orange, + ), + Container( + height: 100.0, + width:100.0, + child: Text("Container 2"), + color: Colors.white, + ), + Container( + height: 100.0, + width:100.0, + child: Text("Container 3"), + color: Colors.green, + ) + ], + ) + ), + ), + ); + } +} +``` + +So here's 3 Containers. Now a column doesn't have a child. It has `children` because we can put lots of things inside our column. And it's got this square brackets `[]`. We can put lots of widgets in between these `[]`. So now we have three containers all 100 by 100. All with different colours, and it's being laid out in a vertical direction. This is because we have all the containers inside a column. Now our columns will automatically try and take up as much of the vertical space as possible. So if we go into Flutter Inspector and we check out what the column looks like, you can see a box. It's trying to take up all of the space that is available vertically. But horizontally, it's limiting itself to the size of its children. + +

+1 +

+ +We can change this. We can change its `mainAxisSize`, and the main axis for a column is of course vertical. So let's change this to the minimum size `mainAxisSize: MainAxisSize.min`. And you can see how the column shrinks to be the size that's only required to fit my three containers, all of its children. + +

+2 +

+ +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + backgroundColor: Colors.white70, + body: SafeArea( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + height: 100.0, + width:100.0, + child: Text("Container 1"), + color: Colors.orange, + ), + Container( + height: 100.0, + width:100.0, + child: Text("Container 2"), + color: Colors.white, + ), + Container( + height: 100.0, + width:100.0, + child: Text("Container 3"), + color: Colors.green, + ) + ], + ) + ), + ), + ); + } +} +``` + +Currently, our column is laying out its children from top to bottom, so Now what if we wanted to go the other direction instead? We can change its vertical direction. We can either change it to go up `verticalDirection: VerticalDirection.up`, which means it goes from the bottom to the top. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + backgroundColor: Colors.white70, + body: SafeArea( + child: Column( + verticalDirection: VerticalDirection.up, + children: [ + Container( + height: 100.0, + width:100.0, + child: Text("Container 1"), + color: Colors.orange, + ), + Container( + height: 100.0, + width:100.0, + child: Text("Container 2"), + color: Colors.white, + ), + Container( + height: 100.0, + width:100.0, + child: Text("Container 3"), + color: Colors.green, + ) + ], + ) + ), + ), + ); + } +} +``` + +

+3 +

+ +Or we can change it as down `verticalDirection: VerticalDirection.down`, which is the default, where it goes from top to bottom. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + backgroundColor: Colors.white70, + body: SafeArea( + child: Column( + verticalDirection: VerticalDirection.down, + children: [ + Container( + height: 100.0, + width:100.0, + child: Text("Container 1"), + color: Colors.orange, + ), + Container( + height: 100.0, + width:100.0, + child: Text("Container 2"), + color: Colors.white, + ), + Container( + height: 100.0, + width:100.0, + child: Text("Container 3"), + color: Colors.green, + ) + ], + ) + ), + ), + ); + } +} +``` + +

+4 +

+ +Now what if you didn't want to change the direction of it, but instead you wanted to change the spacing between our containers. Well then you would use something called `mainAxisAlignment`, and by default, all of our containers are aligned to the start. So it's `MainAxisAlignment.start`. And this will try and place the children as close to the start of the main axis as possible. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + backgroundColor: Colors.white70, + body: SafeArea( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + height: 100.0, + width:100.0, + child: Text("Container 1"), + color: Colors.orange, + ), + Container( + height: 100.0, + width:100.0, + child: Text("Container 2"), + color: Colors.white, + ), + Container( + height: 100.0, + width:100.0, + child: Text("Container 3"), + color: Colors.green, + ) + ], + ) + ), + ), + ); + } +} +``` + +

+2 +

+ +However, we can also change it to an end. So if we had `MainAxisAlignment.end` then our containers will all be bunched down here, towards the end of our main axis. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + backgroundColor: Colors.white70, + body: SafeArea( + child: Column( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Container( + height: 100.0, + width:100.0, + child: Text("Container 1"), + color: Colors.orange, + ), + Container( + height: 100.0, + width:100.0, + child: Text("Container 2"), + color: Colors.white, + ), + Container( + height: 100.0, + width:100.0, + child: Text("Container 3"), + color: Colors.green, + ) + ], + ) + ), + ), + ); + } +} +``` + +

+5 +

+ +Now you can also move it all to the centre `MainAxisAlignment.center`. And you can use a variety of these to determine how you want your screen to be laid out. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + backgroundColor: Colors.white70, + body: SafeArea( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + height: 100.0, + width:100.0, + child: Text("Container 1"), + color: Colors.orange, + ), + Container( + height: 100.0, + width:100.0, + child: Text("Container 2"), + color: Colors.white, + ), + Container( + height: 100.0, + width:100.0, + child: Text("Container 3"), + color: Colors.green, + ) + ], + ) + ), + ), + ); + } +} +``` + +

+6 +

+ +Now, what if we didn't want all of our children to be bunched together like this, at the centre at the start or the end. What if we wanted them to be spread out a bit. Well we can use something that's called **'spaceEvenly'** And this will calculate the amount of free space that the column has, and it'll space all of our children evenly throughout the column. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + backgroundColor: Colors.white70, + body: SafeArea( + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Container( + height: 100.0, + width:100.0, + child: Text("Container 1"), + color: Colors.orange, + ), + Container( + height: 100.0, + width:100.0, + child: Text("Container 2"), + color: Colors.white, + ), + Container( + height: 100.0, + width:100.0, + child: Text("Container 3"), + color: Colors.green, + ) + ], + ) + ), + ), + ); + } +} +``` + +But what if we wanted something to be at the start and something to be at the bottom, and then another one in the centre? Well, we would then use **'spaceBetween'** instead. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + backgroundColor: Colors.white70, + body: SafeArea( + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Container( + height: 100.0, + width:100.0, + child: Text("Container 1"), + color: Colors.orange, + ), + Container( + height: 100.0, + width:100.0, + child: Text("Container 2"), + color: Colors.white, + ), + Container( + height: 100.0, + width:100.0, + child: Text("Container 3"), + color: Colors.green, + ) + ], + ) + ), + ), + ); + } +} +``` + +

+8 +

+ +Now, what if I wanted to change the way that my containers are aligned on the horizontal axis? Well in this case, instead of using the main axis alignment property, I would be using something called the `CrossAxisAlignment`. And this is **_perpendicular to the main axis_**. So for columns, they'll be the horizontal. Now here, I also have access to the start `CrossAxisAlignment.start`, and also end `CrossAxisAlignment.end`. But you'll notice that if when I just go ahead and put `crossAxisAlignment: CrossAxisAlignment.end` in, and hit save to hot reload, nothing happens on the horizontal axis. And the reason for this is that my axis alignment is trying to align with my children. So that means say, if I had a much wider child, let's say `width:300`, then all of the children will align themselves to the right edge of each other. But if they're all the same size, then they're already aligned on the end, so they won't pop over to the right side. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + backgroundColor: Colors.white70, + body: SafeArea( + child: Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Container( + height: 100.0, + width:100.0, + child: Text("Container 1"), + color: Colors.orange, + ), + Container( + height: 100.0, + width:300.0, + child: Text("Container 2"), + color: Colors.white, + ), + Container( + height: 100.0, + width:100.0, + child: Text("Container 3"), + color: Colors.green, + ) + ], + ) + ), + ), + ); + } +} +``` + +

+10 +

+ +Now if you wanted all your three containers to go over to the right, one way of doing this might be creating simply an invisible container, where you give it a width of infinity, and to give it a width of infinity, we write `width:double.infinity` And what this will do is it will create a container down here. It has no height. So it's just got a width, and it's as wide as the screen will allow it to be. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + backgroundColor: Colors.white70, + body: SafeArea( + child: Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Container( + height: 100.0, + width:100.0, + child: Text("Container 1"), + color: Colors.orange, + ), + Container( + height: 100.0, + width:100.0, + child: Text("Container 2"), + color: Colors.white, + ), + Container( + height: 100.0, + width:100.0, + child: Text("Container 3"), + color: Colors.green, + ), + Container ( + width: double.infinity, + ) + ], + ) + ), + ), + ); + } +} +``` + +

+11 +

+ + +In this case, it's just the last bit. It doesn't have a colour. So it's completely invisible but it pushes all of the children to the right because we're now all aligning to the end of our column on the horizontal axis and one of our containers is as wide as the screen allows. Now, What if instead of doing this, you wanted actually to stretch all your containers, so that they fill the entire width? Now you could provide width for each of the containers, to be `double.infinity`. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + backgroundColor: Colors.white70, + body: SafeArea( + child: Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Container( + height: 100.0, + width:double.infinity, + child: Text("Container 1"), + color: Colors.orange, + ), + Container( + height: 100.0, + width:double.infinity, + child: Text("Container 2"), + color: Colors.white, + ), + Container( + height: 100.0, + width:double.infinity, + child: Text("Container 3"), + color: Colors.green, + ), + Container ( + width: double.infinity, + ) + ], + ) + ), + ), + ); + } +} +``` + +So now, all of the containers will stretch to the entire width that's possible. + +

+12 +

+ +But there's a much easier way of doing this actually, by using a property that comes with the column. And instead of using `CrossAxisAlignment.end`, we can use `CrossAxisAlignment.stretch`. And this will stretch the children so that they can stretch across the screen. I no longer need to provide a width property for my containers because it's being stretched by its parent, the column. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + backgroundColor: Colors.white70, + body: SafeArea( + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Container( + height: 100.0, + child: Text("Container 1"), + color: Colors.orange, + ), + Container( + height: 100.0, + child: Text("Container 2"), + color: Colors.white, + ), + Container( + height: 100.0, + child: Text("Container 3"), + color: Colors.green, + ), + Container ( + width: double.infinity, + ) + ], + ) + ), + ), + ); + } +} +``` + +

+13 +

+ +Now what if you wanted a little bit of spacing between your containers. Because at the moment, they're all right next to each other with no space in between. If you know exactly how much space you want to have between your containers, you can use a `SizedBox`. And a `SizedBox` can have a height and width of course. But in the case of where it's being put inside a column, which is aligned vertically, then we only need to provide a height. So we can give it a `height:20`, and leave its width property as zero. And you can see, this goes in here between container 1 and container 2, and gives us a little bit of spacing between those two things. And it helps us when we want a little bit of space between our children. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + backgroundColor: Colors.white70, + body: SafeArea( + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Container( + height: 100.0, + child: Text("Container 1"), + color: Colors.orange, + ), + SizedBox( + height: 20.0, + ), + Container( + height: 100.0, + child: Text("Container 2"), + color: Colors.white, + ), + Container( + height: 100.0, + child: Text("Container 3"), + color: Colors.green, + ), + Container ( + width: double.infinity, + ) + ], + ) + ), + ), + ); + } +} +``` + +

+14 +

+ +Now, everything that I've written about columns also applies to rows. So in fact, I can straight up just change our column to a row, and you'll see it does the same thing on the horizontal axis. So in this case though, the main axis of row is of course horizontal but the cross axis alignment is vertical. The vertical alignment has to be stretched so all our containers are stretched vertically. And for all the children, they each have a height which doesn't get taken into account anymore because it's being stretched, but we can give it a width for example. So let's say we give it a width of 30 for the first one. You can see that gets affected because the containers are being aligned on the horizontal axis. Now you can see that the sized box disappeared because I'm giving it a height but that doesn't matter when it doesn't have a width. So in a row, to give it space, we're gonna be using a sized box with a width to give it a little bit of spacing. + +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + backgroundColor: Colors.white70, + body: SafeArea( + child: Row( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Container( + width: 100.0, + child: Text("Container 1"), + color: Colors.orange, + ), + SizedBox( + width: 30.0, + ), + Container( + width: 100.0, + child: Text("Container 2"), + color: Colors.white, + ), + Container( + width: 100.0, + child: Text("Container 3"), + color: Colors.green, + ), + ], + ) + ), + ), + ); + } +} +``` + +

+15 +

+ +The best way of getting to know columns and rows and containers is really to try it out for yourself. + +Now while you're playing around with this. It's usually easier for us to see what something will do before actually writing out the code. So I recommend pulling up this [Flutter layout cheat sheet that's created by Tomek](https://medium.com/flutter-community/flutter-layout-cheat-sheet-5363348d037e). diff --git a/Android_Development_With_Flutter/05_Flutter_Widgets/04_Introduction_To_Text_widget/assets/first.png b/Android_Development_With_Flutter/05_Flutter_Widgets/04_Introduction_To_Text_widget/assets/first.png new file mode 100644 index 0000000000..745a4788be Binary files /dev/null and b/Android_Development_With_Flutter/05_Flutter_Widgets/04_Introduction_To_Text_widget/assets/first.png differ diff --git a/Android_Development_With_Flutter/05_Flutter_Widgets/04_Introduction_To_Text_widget/assets/last.png b/Android_Development_With_Flutter/05_Flutter_Widgets/04_Introduction_To_Text_widget/assets/last.png new file mode 100644 index 0000000000..71d7dcb98c Binary files /dev/null and b/Android_Development_With_Flutter/05_Flutter_Widgets/04_Introduction_To_Text_widget/assets/last.png differ diff --git a/Android_Development_With_Flutter/05_Flutter_Widgets/04_Introduction_To_Text_widget/assets/second.png b/Android_Development_With_Flutter/05_Flutter_Widgets/04_Introduction_To_Text_widget/assets/second.png new file mode 100644 index 0000000000..0670f5c7b1 Binary files /dev/null and b/Android_Development_With_Flutter/05_Flutter_Widgets/04_Introduction_To_Text_widget/assets/second.png differ diff --git a/Android_Development_With_Flutter/05_Flutter_Widgets/04_Introduction_To_Text_widget/text_widget.md b/Android_Development_With_Flutter/05_Flutter_Widgets/04_Introduction_To_Text_widget/text_widget.md new file mode 100644 index 0000000000..c6a45d0614 --- /dev/null +++ b/Android_Development_With_Flutter/05_Flutter_Widgets/04_Introduction_To_Text_widget/text_widget.md @@ -0,0 +1,196 @@ +#
📱 Text Widget ✨
+ + Image credit: [Flutter Docs](https://miro.medium.com/max/828/1*UyChqe1Fs8-ewyudvjk63A.png) + + In Flutter, a Text is a widget that allows us to show a string of text on a single line in our app. + We may split the string across many lines or show it all on the single line, depending on the layout constraints. + If we don't provide the text widget any styling, it will choose DefaultTextStyle class style. + +Let's see simple example of how to use text widget. +```dart +import 'package:flutter/material.dart'; +void main() { + runApp(MyApp()); +} +class MyApp extends StatelessWidget { + // This widget is the root of your application. + @override + Widget build(BuildContext context) { + return MaterialApp( + home: MyHomePage(), //It is calling MyHomePage class + ); + } +} +class MyHomePage extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("Learning"), //We provide a string inside text widget which is displaying on topbar of app. + ), + body:Center( + child: Text("Hello"), //We provided a string inside text widget which is used in body. It will display on center of app. + ), + ); + } +} + +``` + + + ## Text widget constructor + ```dart + const Text( +String data, +{Key? key, +TextStyle? style, +StrutStyle? strutStyle, +TextAlign? textAlign, +TextDirection? textDirection, +Locale? locale, +bool? softWrap, +TextOverflow? overflow, +double? textScaleFactor, +int? maxLines, +String? semanticsLabel, +TextWidthBasis? textWidthBasis, +TextHeightBehavior? textHeightBehavior} +) + ``` + ## Important properties of text widget +
    +
  • style - It is the most common property as it is used for styling the text. This property is used for changing font color, font style, font weight, backgroundcolor, etc. +
  • textAlign - It is used to align the text horizontally. +
  • textDirection - It is used for changing the direction of text. +
  • maxLines - It is used for display the maximum number of lines in text widget. +
+ + ## Implementation of style property + ```dart + import 'package:flutter/material.dart'; +void main() { + runApp(MyApp()); +} +class MyApp extends StatelessWidget { // This widget is the root of your application. + @override + Widget build(BuildContext context) { + return MaterialApp( + home: MyHomePage(), //It is calling homescreen using MyHomePage class + ); + } +} +class MyHomePage extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("Learning"), + ), + body:Center( //center widget is used to diplay the text in center of app + child: Text( "Hello", // String provided inside text widget + style: TextStyle( //TextStyle class is used to give styling to the text + fontSize: 50, // this attribute decides the fontsize of text + fontWeight: FontWeight.bold, //this attribute decides the fontWeight of text + color: Colors.red, //It gives color to the text + backgroundColor: Colors.blue, //It gives color to the background of specified text + fontStyle: FontStyle.italic, //It is used for changing fontstyle of text + letterSpacing: 0.5 //It gives spaces between letters of string + ), + ), + ), + ); + } +} +``` + +## RichText class +We use RichText class when we want to display a paragraph which contain texts with different styles. RichText class uses TextSpan class and we can individually style each span. +## RichText constructor +```dart +RichText( +{Key? key, +required InlineSpan text, +TextAlign textAlign, +TextDirection? textDirection, +bool softWrap, +TextOverflow overflow, +double textScaleFactor, +int? maxLines, +Locale? locale, +StrutStyle? strutStyle, +TextWidthBasis textWidthBasis, +TextHeightBehavior? textHeightBehavior} +) +``` +## Implementation +```dart +import 'package:flutter/material.dart'; +void main() { + runApp(MyApp()); +} +class MyApp extends StatelessWidget { // This widget is the root of your application. + @override + Widget build(BuildContext context) { + return MaterialApp( + home: MyHomePage(), //It is calling homescreen using MyHomePage class + ); + } +} +class MyHomePage extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("Learning"), + ), + body:Container( + child: Center( + child: RichText( + text: TextSpan( + text: "Hello ", //Here first string is provided + style: TextStyle( + color: Colors.black26, //styling of first string + fontSize: 30 + ), + children: const [ + TextSpan(text: 'bold', // here second string is provided + style: TextStyle( // styling of second string + fontSize: 50, + fontWeight: FontWeight.bold, + color: Colors.blue + ), + ), + TextSpan(text: ' world!', //third string is provided + style: TextStyle( //styling of third string + fontSize: 30, + color: Colors.black26 + ), + ), + ], + ), + ), + ), + ), + ); + } + } + + +``` + + + + So that’s all you need to know to get started with Text widget in Flutter. Hope you found it helpful. If you have any doubts you can definitely visit the official documentation of [Flutter](https://flutter.dev/docs/development/ui/widgets/text). + +## HAPPY LEARNING 🙌✨ + +### REFERENCES + +- For preparing this document official documentation of [flutter](https://flutter.dev/docs/development/ui/widgets/text). was referred for maintaining the authenticity of the code and also for making the topics more informative one external source was referred. +- The link of blog that was reffered -: +
Link
+ diff --git a/Android_Development_With_Flutter/05_Flutter_Widgets/05_Appbar_In_Flutter/Appbar_widget.md b/Android_Development_With_Flutter/05_Flutter_Widgets/05_Appbar_In_Flutter/Appbar_widget.md new file mode 100644 index 0000000000..789382e0d6 --- /dev/null +++ b/Android_Development_With_Flutter/05_Flutter_Widgets/05_Appbar_In_Flutter/Appbar_widget.md @@ -0,0 +1,148 @@ +## Appbar widget +#### What is Appbar Widget ? +Appbar is the most important component of any application. We can build our application's topbar beautiful with the help of appbar. Appbar consist of another widgets like TabBar, FlexibleSpaceBar etc. We use appbar inside scaffold widget because appbar need some padding if we wrap it under mediaQuery so it is better to use it inside scaffold. Scaffold widget handle the problem of padding smoothly. +
+
+## This is how a simple appbar look like:- + +
+ Ukkonen +

image credit geeksforgeeks

+

+ +## AppBar constructor + +```dart +AppBar({ + Key? key, + Widget? leading, + bool automaticallyImplyLeading, + Widget? title, + List? actions, + Widget? flexibleSpace, + PreferredSizeWidget? bottom, + double? elevation, + Color? shadowColor, + ShapeBorder? shape, + Color? backgroundColor, + Color? foregroundColor, + IconThemeData? iconTheme, + IconThemeData? actionsIconTheme, + bool primary, + bool? centerTitle, + bool excludeHeaderSemantics, + double? titleSpacing, + double toolbarOpacity, + double bottomOpacity, + double? toolbarHeight, + double? leadingWidth, + TextStyle? toolbarTextStyle, + TextStyle? titleTextStyle, + SystemUiOverlayStyle? systemOverlayStyle +}) +``` +Appbar have some important properties: +
    +
  • leading - content inside leading will display before title of appbar
  • +
  • title - It will display the title of appbar
  • +
  • actions - It will display after title
  • +
+ +## Implementation of title property +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + // This widget is the root of your application. + @override + Widget build(BuildContext context) { + return MaterialApp( + home: MyHomePage(), // home (first page of app) of this app is MyHomePage + ); + } +} +class MyHomePage extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text( // title prperty + "Learning" // this text will be shown on topbar of app + ), + ), + ); + } +} + +``` +## Output + + + ## Explanation + Here title property is used to display the given word on Appbar. Title uses text widget to display the text. + + + + +## Implementation of another properties +```dart +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + // This widget is the root of your application. + @override + Widget build(BuildContext context) { + return MaterialApp( + home: MyHomePage(), + ); + } +} + +class MyHomePage extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("Learning"), //title has some text which will display on topbar + actions: [ //actions property which will take multiple widgets as children + IconButton( + icon: Icon(Icons.account_circle), + tooltip: 'Your account', + onPressed: () {}, + ), + ], + backgroundColor: Colors.blue, //backgroundColor is blue so the color of appbar will be blue + leading: IconButton( // leading is iconButton so icon will be display before title + icon: Icon(Icons.menu), + tooltip: 'Menu', + onPressed: () {}, + ), + ), + ); + } +} +``` +## Output + + + ## Explanation + Here first property we use is title which display the title of the appbar for example we have written 'Learning' here so in output app is displaying learning on topbar. + second property used here is action widget. In action widget iconButton is used to display account_circle icon after the title. Tooltip is also provided which shows text when user hover over that icon. + Third property used here is backgroundColor which gives the colour to appbar. Fourth property used here is leading. In leading iconButton is used to display menu icon before the title of appbar. + + ###### Reference taken from https://www.geeksforgeeks.org/flutter-appbar-widget/ and https://api.flutter.dev/flutter/material/AppBar-class.html + + + + + diff --git a/Android_Development_With_Flutter/05_Flutter_Widgets/05_Appbar_In_Flutter/assets/First.png b/Android_Development_With_Flutter/05_Flutter_Widgets/05_Appbar_In_Flutter/assets/First.png new file mode 100644 index 0000000000..1b3a387a02 Binary files /dev/null and b/Android_Development_With_Flutter/05_Flutter_Widgets/05_Appbar_In_Flutter/assets/First.png differ diff --git a/Android_Development_With_Flutter/05_Flutter_Widgets/05_Appbar_In_Flutter/assets/Second.png b/Android_Development_With_Flutter/05_Flutter_Widgets/05_Appbar_In_Flutter/assets/Second.png new file mode 100644 index 0000000000..86786f8339 Binary files /dev/null and b/Android_Development_With_Flutter/05_Flutter_Widgets/05_Appbar_In_Flutter/assets/Second.png differ diff --git a/Android_Development_With_Flutter/06_Animation_In_Flutter/01_Introduction_To_Animation_In_Flutter/Animation-Documentation.md b/Android_Development_With_Flutter/06_Animation_In_Flutter/01_Introduction_To_Animation_In_Flutter/Animation-Documentation.md new file mode 100644 index 0000000000..af5296a8ba --- /dev/null +++ b/Android_Development_With_Flutter/06_Animation_In_Flutter/01_Introduction_To_Animation_In_Flutter/Animation-Documentation.md @@ -0,0 +1,344 @@ +#
📱 Introduction to Animations ✨
+ +![image](https://user-images.githubusercontent.com/78701779/135496982-0b577d2a-3d9c-4714-8e19-8b5bbf87c7cb.png) + + +Animations are an essential part of making the UI of a mobile application feel natural and smooth to the user. Smooth transitions and interactive elements make an app pleasant to use. On the other hand, badly made animations can make the app look clumsy or worse, break the application altogether. For this reason, learning the fundamentals of animations in any framework is an essential step towards delivering a superior user experience. + +Well-designed animations make a UI feel more intuitive, contribute to the slick look and feel of a polished app, and improve the user experience. Flutter's animation support makes it easy to implement a variety of animation types. Many widgets, especially [Material widgets](https://flutter.dev/docs/development/ui/widgets/material), come with the standard motion effects defined in their design spec, but it's also possible to customize these effects. + + +Flutter animations are a powerful aspect of the framework. In this documentation, we will look at the fundamentals of creating a flutter animation. The great thing about going through these fundamentals is that the structure stays the same even across most complex animations and learning this structure will give us a pathway to creating amazing user interfaces. + +## **Choosing an Approach-:** + +There are different approaches you can take when creating animations in Flutter. The following decision tree helps you decide what approach to use when implementing a Flutter animation: + +

decesion-tree

+ +Now we will try to understand about each animation one by one- + +- ### **Implicit Animations**-: + +Flutter includes a series of widgets that are animated versions of existing widgets that you probably already used in your app, such as the [AnimatedContainer](https://api.flutter.dev/flutter/widgets/AnimatedContainer-class.html) version of the [Container](https://api.flutter.dev/flutter/widgets/Container-class.html) widget and the [AnimatedPositioned](https://api.flutter.dev/flutter/widgets/AnimatedPositioned-class.html) version of the [Positioned](https://api.flutter.dev/flutter/widgets/Positioned-class.html) widget. + +These widgets automatically animate changes to their properties. When you rebuild the widget with new property values, such as with a [StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)'s `setState`, the widget handles driving the animation from the previous value to the new value. + +

A screen recording where the code for an app is modified and the application animates the size of a star widget.
+

+ + +These widgets are called [Implicitly Animated Widgets](https://api.flutter.dev/flutter/widgets/ImplicitlyAnimatedWidget-class.html). They are typically the first thing you reach for when you need to add animations to your app. They provide a way to add animations without adding additional complexity. + + +- ### **Explicit Animations** + +Now implicit Animations works perfectly for many animation goals, but sometimes that ever-forward arrow of time leaves us feeling temporally locked. So, as we pause and contemplate the laws of thermodynamics and the inevitable heat death of the universe, wouldn't it be nice if we could reverse time, and do it all again? + +Enter our first foray into Flutter's explicit animations! We won't be building any time machines today, but we will be learning how to gain a bit more control over your animations using Transition widgets. + +Transition widgets are a set of Flutter widgets whose names all end in --- you guessed it ---Transition. [`ScaleTransition`](https://api.flutter.dev/flutter/widgets/ScaleTransition-class.html), [`DecoratedBoxTransition`](https://api.flutter.dev/flutter/widgets/DecoratedBoxTransition-class.html), [`SizeTransition`](https://api.flutter.dev/flutter/widgets/SizeTransition-class.html), and more. They look and feel a lot like our `AnimatedBlah` widgets. [`PositionedTransition`](https://api.flutter.dev/flutter/widgets/PositionedTransition-class.html), for example, animates a widget's transition between different positions. This is much like [`AnimatedPositioned`](https://api.flutter.dev/flutter/widgets/AnimatedPositioned-class.html), but there is one major difference: these Transition widgets are extensions of [`AnimatedWidget`](https://api.flutter.dev/flutter/widgets/AnimatedWidget-class.htmlhttps://api.flutter.dev/flutter/widgets/AnimatedWidget-class.html). This makes them *explicit animations*. + +## **Type of Animations-:** + +Generally, animations are either tween- or physics-based. The following sections explain what these terms mean, and point you to resources where you can learn more. + +- ### Tween animation + +Short for *in-betweening*. In a tween animation, the beginning and ending points are defined, as well as a timeline, and a curve that defines the timing and speed of the transition. The framework calculates how to transition from the beginning point to the end point. + +The documents listed above, such as the [Animations tutorial](https://flutter.dev/docs/development/ui/animations/tutorial), are not specifically about tweening, but they use tweens in their examples. + +- ### Physics-based animation + +In physics-based animation, motion is modeled to resemble real-world behavior. When you toss a ball, for example, where and when it lands depends on how fast it was tossed and how far it was from the ground. Similarly, dropping a ball attached to a spring falls (and bounces) differently than dropping a ball attached to a string. + + * [Animate a widget using a physics simulation](https://flutter.dev/docs/cookbook/animation/physics-simulation)\ + A recipe in the animations section of the Flutter cookbook. + + * [Flutter Gallery](https://github.com/flutter/gallery)\ + Under Material Components, the [`Grid`](https://github.com/flutter/gallery/blob/master/lib/demos/material/grid_list_demo.dart) example demonstrates a fling animation. Select one of the images from the grid and zoom in. You can pan the image with flinging or dragging gestures. + + * Also see the API documentation for [`AnimationController.animateWith`](https://api.flutter.dev/flutter/animation/AnimationController/animateWith.html) and [`SpringSimulation`](https://api.flutter.dev/flutter/physics/SpringSimulation-class.html). + +## **Pre-canned animations** + +If you are using Material widgets, you might check out the [animations package](https://pub.dev/packages/animations) available on pub.dev. This package contains pre-built animations for the following commonly used patterns: `Container` transforms, shared axis transitions, fade through transitions, and fade transitions. + +## **Common animation patterns** + +Most UX or motion designers find that certain animation patterns are used repeatedly when designing a UI. This section lists some of the commonly used animation patterns, and tells you where to learn more. + +### Animated list or grid + +This pattern involves animating the addition or removal of elements from a list or grid. + +- [`AnimatedList` example](https://flutter.github.io/samples/animations.html)\ + This demo, from the [Sample app catalog](https://flutter.github.io/samples), shows how to animate adding an element to a list, or removing a selected element. The internal Dart list is synced as the user modifies the list using the plus (+) and minus (-) buttons. + +### [](https://flutter.dev/docs/development/ui/animations#shared-element-transition)Shared element transition + +In this pattern, the user selects an element---often an image---from the page, and the UI animates the selected element to a new page with more detail. In Flutter, you can easily implement shared element transitions between routes (pages) using the `Hero` widget. + +- [Hero animations](https://flutter.dev/docs/development/ui/animations/hero-animations) How to create two styles of Hero animations: + - The hero flies from one page to another while changing position and size. + - The hero's boundary changes shape, from a circle to a square, as its flies from one page to another. +- [Flutter Gallery](https://github.com/flutter/gallery)\ + You can build the Gallery app yourself, or download it from the Play Store. The [Shrine](https://github.com/flutter/gallery/tree/master/lib/studies/shrine) demo includes an example of a hero animation. + +- Also see the API documentation for the [`Hero`](https://api.flutter.dev/flutter/widgets/Hero-class.html), [`Navigator`](https://api.flutter.dev/flutter/widgets/Navigator-class.html), and [`PageRoute`](https://api.flutter.dev/flutter/widgets/PageRoute-class.html) classes. + +### Staggered animation + +Animations that are broken into smaller motions, where some of the motion is delayed. The smaller animations might be sequential, or might partially or completely overlap. + +- [Staggered Animations](https://flutter.dev/docs/development/ui/animations/staggered-animations) + + +## **Description of Animations-:** + +### 1. **Tween Animations-:** + +```dart +// Tween Animation Example. Replace main.dart in a flutter project // with this code +import 'package:flutter/material.dart'; +import 'package:flutter/animation.dart'; + +void main() => runApp(MyApp()); + +class MyApp extends StatefulWidget { + _MyApp createState() => _MyApp(); +} + +class _MyApp extends State with SingleTickerProviderStateMixin { + Animation animation; + AnimationController controller; + + @override + void initState() { + super.initState(); + + controller = + AnimationController(vsync: this, duration: Duration(seconds: 2)); + animation = Tween(begin: 0, end: 300).animate(controller) + ..addListener(() { + setState(() {}); + }) + ..addStatusListener((status) { + if (status == AnimationStatus.completed) { + controller.reverse(); + } else if (status == AnimationStatus.dismissed) { + controller.forward(); + } + }); + + controller.forward(); + } + + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Center( + child: Container( + color: Colors.white, + height: animation.value, + width: animation.value, + ), + ), + ); + } + + @override + void dispose() { + controller.dispose(); + super.dispose(); + } +} +``` +Above dart code builds a scaling up-down white container animation loop as seen below. + +

gif

+ +Now the major components of the code can be explained by, +**`SingleTickerProviderStateMixin:`** This mixin allow us to use ONE animation controller in a state. If you need multiple controllers in a state we can use TickerProviderStateMixin. + +**`AnimationController:`** This class will help us to control our animation with methods like reverse, forward, animateTo, animateBack. And some useful properties like isAnimating, isCompleted, isDismissed… + +**`Tween:`** Tween returns an Animatable typed object but we use animate method on tween and it returns an animation typed object and with double-dot syntax we can assign it to animation variable. As you see tween has a start and end value. + +**`vsync:`** This animation controller’s parameter is type of TickerProvider. We passed “this” as vsync because our SingleTickerProviderStateMixin implements TickerProvider class. + +**`addListener:`** This listener fires every time the value of tween changes between min and max values. We pass setState function to listener so whenever tween value changes our widget updates itself. + +**`addStatusListener:`** This listener fires when status of animation changes. With this listener we were able to loop our animation. AnimationStatus.dismissed means animation reversed and reached where it started first. + + +### 2. **Physics-based animation-:** + +```dart +import 'package:flutter/material.dart'; +import 'package:flutter/animation.dart'; +import 'package:flutter/physics.dart'; + +void main() => runApp(PhysicsAnimation()); + +class PhysicsAnimation extends StatefulWidget { + _PhysicsAnimation createState() => _PhysicsAnimation(); +} + +class _PhysicsAnimation extends State + with SingleTickerProviderStateMixin{ + + AnimationController controller; + GravitySimulation simulation; + + @override + void initState() { + super.initState(); + + simulation = GravitySimulation( + 100.0, // acceleration + 0.0, // starting point + 500.0, // end point + 0.0, // starting velocity + ); + + controller = + AnimationController(vsync: this, upperBound: 500) + ..addListener(() { + setState(() {}); + }); + + controller.animateWith(simulation); + } + + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Stack( + children: [ + Positioned( + left: 50, + top: controller.value, + height: 10, + width: 10, + child: Container( + color: Colors.redAccent, + ), + ), + ] + ), + ); + } + + @override + void dispose() { + controller.dispose(); + super.dispose(); + } +} +``` +Some part of this code is already explained in the tween animations now the extra part can be explained as-: + +**`GravitySimulation:`** A class for simulating gravity initialized with acceleration, starting point, ending point and starting velocity. In this example we provide 100 units for acceleration and our destination is zero to 500 with zero initial velocity. + +**`upperBound:`** This may be a bug or it is just me. End position in simulation will not work as expected because AnimationController class value has a max and min limit. Default value for upperBound is 1. When you use simulation and your controller.value stucks at 1 you should change upperBound value accordingly. There is lowerBound property too which is default 0. We don’t need it in this example but it would be useful if we wanted to set our starting point to a negative value. + +**`controller.animateWith:`** We tell our controller to use the simulation we initialized. You may notice that we didn’t set any duration in our controller because controller will calculate duration of animation with parameters we set in our simulation. + +After all these we use controller.value in the Positioned widget wrapped with a Stack widget. And we have this; + +

gif

+ +Next is SpringSimulation. + +```dart +import 'package:flutter/material.dart'; +import 'package:flutter/animation.dart'; +import 'package:flutter/physics.dart'; + +void main() => runApp(PhysicsAnimation()); + +class PhysicsAnimation extends StatefulWidget { + _PhysicsAnimation createState() => _PhysicsAnimation(); +} + +class _PhysicsAnimation extends State + with SingleTickerProviderStateMixin{ + AnimationController controller; + + SpringSimulation simulation; + + @override + void initState() { + super.initState(); + + simulation = SpringSimulation( + SpringDescription( + mass: 1, + stiffness: 100, + damping: 1, + ), + 0.0, // starting point + 300.0, // ending point + 10, // velocity + ); + + controller = + AnimationController(vsync: this, upperBound: 500, ) + ..addListener(() { + print(controller.value); + setState(() {}); + }); + + controller.animateWith(simulation); + } + + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Stack( + children: [ + Positioned( + left: 50, + top: controller.value, + height: 10, + width: 10, + child: Container( + color: Colors.redAccent, + ), + ), + ] + ), + ); + } + + @override + void dispose() { + controller.dispose(); + super.dispose(); + } +} +``` + +Most is same with previous example. We’ve just used another simulation class. Notice upperBound value is bigger than ending point in simulation parameters because of spring’s oscillation. +Check out these GIFs to see how SpringDescription’s parameters affect the animation. + +- #### mass:1 stiffness:100 damping: varies + +

gif

+ +- #### mass:1 damping:1 stiffness: varies + +

gif

+ +
+So that’s all that you need to know to get started with Animations in Flutter. Hope you found it helpful.If you have any doubts you can definetly visit the official documentation of [Flutter](https://flutter.dev/docs/development/ui/animations/tutorial). + +## HAPPY LEARNING 🙌✨ + +### REFERENCES + +- For preparing these documents official documentation of [flutter](hhttps://flutter.dev/docs/development/ui/animations/tutorial). was referred for maintaining the authenticity of the code and also for making the topics more informative some external sources like blogs were referred. +- The links of blog that were reffered -: +
Link1Link2
diff --git a/Android_Development_With_Flutter/06_Animation_In_Flutter/02_Introduction_To_Flutter_Animation_Part-2/Flutter animation.md b/Android_Development_With_Flutter/06_Animation_In_Flutter/02_Introduction_To_Flutter_Animation_Part-2/Flutter animation.md new file mode 100644 index 0000000000..37cb409097 --- /dev/null +++ b/Android_Development_With_Flutter/06_Animation_In_Flutter/02_Introduction_To_Flutter_Animation_Part-2/Flutter animation.md @@ -0,0 +1,148 @@ +![image](https://user-images.githubusercontent.com/64470404/134809190-c2451032-f316-4d2a-b101-4a5b29359b04.png) + +# FLUTTER ANIMATION + +- Animation is a technique or a process which manipulates figures object or anything like that, with the moving appearance.
+- It enhances the app, and makes it look more beautiful.
+- Animation have two distinct values, namely, start value and end value.
+- Duration of the animation affect the speed of animation. + + ### ___ANIMATION CLASSES IN FLUTTER:___ + ``Animation `` : Alters value between decimal numebers.
+ ``Animation `` : alters colours
+ ``Animation `` : alters size
+ ``Animation Controller``: Controls animation
+ + Every Flutter animation needs atleast two elements,tween to get generate values and AnimationController as parent.
+ AnimationController gives progress of the animation but animation gives actual tween value.
+ AnimationController controls over behaviour of animation.
+For the AnimationController. we need to add a mixin to our class for vsync
+ ### CREATING BASIC ANIMATION IN FLUTTER: + + >> Create new project in flutter and name it as of your wish, also check everything's working fine or not. After that, launch your project
+
+ +
+ + ### BASIC ANIMATION CODE: + + + + +``` + +import 'package:flutter/material.dart'; + +void main() => runApp(MyApp()); + +class MyApp extends StatefulWidget { + @override + _MyAppState createState() => _MyAppState(); +} + +class _MyAppState extends State { + double _width = 200; + double _height = 200; + + double _updateState() { + setState(() { + _width = 400; + _height = 400; + }); + } + + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'Animation', + home: Scaffold( + body: Center( + child: AnimatedContainer( + duration: Duration(seconds: 10), + curve: Curves.bounceOut, + width: _width, + height: _height, + color: Colors.lightBlue[200], + child: Text('Animation', style: Theme.of(context).textTheme.headline5), + ), + ), + ), + ); + } +} + +``` + + + + +
+ + +### BASIC TWEEN ANIMATION + +``` +import 'package:flutter/material.dart'; + +void main() => runApp(MyApp()); + +class MyApp extends StatelessWidget { + Tween _scaleTween = Tween(begin: 1, end: 5); +//ColorTween(begin: Colors.blue, end: Colors.purple) +//SizeTween(begin: Size(0,0), end: Size(10,10)) +//AlignmentTween(begin: Alignment.center, end: Alignment.topRight) + + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'Animation', + home: Scaffold( + body: Center( + child: TweenAnimationBuilder( + tween: _scaleTween, + duration: Duration(milliseconds: 600), + builder: (context, scale, child) { + return Transform.scale(scale: scale, child: child); + }, + child: Container( + width: 200, + height: 200, + color: Colors.green[200], +//child: Center( +//child: Text('Animation', +//style: Theme.of(context).textTheme.headline6, +//), + ), + ), + ), + ), + ); + } +} + + +``` + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/06_Animation_In_Flutter/03_Introduction_To_Animation_Video/Animation-Video.md b/Android_Development_With_Flutter/06_Animation_In_Flutter/03_Introduction_To_Animation_Video/Animation-Video.md new file mode 100644 index 0000000000..f92efa1574 --- /dev/null +++ b/Android_Development_With_Flutter/06_Animation_In_Flutter/03_Introduction_To_Animation_Video/Animation-Video.md @@ -0,0 +1,3 @@ +# Flutter Animation Video + +- [Flutter Animation Video](https://drive.google.com/file/d/12x7xRMcj4Z2jcVrVWYCUkYE4cfKmPAPJ/view?usp=sharing) diff --git a/Android_Development_With_Flutter/07_Plugins_In_Flutter/01_Shared_Preference/01_SharedPreferences.md b/Android_Development_With_Flutter/07_Plugins_In_Flutter/01_Shared_Preference/01_SharedPreferences.md new file mode 100644 index 0000000000..bf455a99ac --- /dev/null +++ b/Android_Development_With_Flutter/07_Plugins_In_Flutter/01_Shared_Preference/01_SharedPreferences.md @@ -0,0 +1,139 @@ +# Shared Preferences +### What is Shared Preferences? +The [SharedPreferences](https://developer.android.com/reference/android/content/SharedPreferences) API in android, is a data storage solution that helps us save primitive data as key-value pairs in a file in device storage. Using this API, one can store, fetch, update or delete the stored data. + +iOS has a similar storage option called [NSUserDefaults](https://developer.apple.com/documentation/foundation/nsuserdefaults). + +Flutter being platform independent, does not support shared preferences out of the box. To use these storage options, we add a plugin called [shared_preferences](https://pub.dev/packages/shared_preferences), which gives access to the platform specific storage (NSUserDefaults for iOS and SharedPreferences for android). + +## Usage: +To get started with the shared_preferences plugin, add the following lines in the pubspec.yaml file of your project. + +```yaml +dependencies: + flutter: + sdk: flutter + shared_preferences: "" +``` + +Or simply run this command from the terminal of your IDE: +``` +flutter pub add shared_preferences +``` +which would automatically add the depedency and update your pubspec.yaml file + +## Implementation +Now let us look at a basic counter application, that uses the shared_preferences plugin. +```dart +import 'package:flutter/material.dart'; +//Importing the plugin +import 'package:shared_preferences/shared_preferences.dart'; +void main() => runApp(const MyApp()); + +class MyApp extends StatelessWidget { + const MyApp({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return const MaterialApp( + title: 'Counter With Shared Preferences', + home: MyHomePage(title: 'Counter With Shared Preferences'), + ); + } +} + +class MyHomePage extends StatefulWidget { + const MyHomePage({Key? key, required this.title}) : super(key: key); + + final String title; + + @override + _MyHomePageState createState() => _MyHomePageState(); +} + +class _MyHomePageState extends State { + int _counter = 0; + + @override + void initState() { + super.initState(); + _loadCounter(); + } + + //Function to load counter value on start + void _loadCounter() async { + final preferences = await SharedPreferences.getInstance(); + setState(() { + //Gets the 'counter' value from the device storage and assigns it to + //_counter which gets displayed on the screen. + _counter = (preferences.getInt('counter') ?? 0); + }); + } + + //Function to increment the counter after click + void _incrementCounter() async { + final preferences = await SharedPreferences.getInstance(); + setState(() { + _counter = (preferences.getInt('counter') ?? 0) + 1; + preferences.setInt('counter', _counter); + }); + } + + //Function to set the _counter value and the 'counter' value from device storage to 0. + void _deleteCounterValue() async{ + final preferences = await SharedPreferences.getInstance(); + + setState(() { + preferences.setInt('counter', 0); + _counter = preferences.getInt('counter')!; + }); + + } + + //Similarly one can also update the shared_preferences values. + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text(widget.title), + ), + body: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Text( + 'Counter Value:', + ), + Text( + '$_counter', + style: Theme.of(context).textTheme.headline4, + ), + + //Button to increment the counter value + + ElevatedButton( + onPressed: _incrementCounter, + child: Text("Increment"), + ), + + //Button to delete the counter value + + ElevatedButton( + onPressed: _deleteCounterValue, + child: Text("Delete Value") + ), + ], + ), + ), + ); + } +} +``` + +The code results in the following application + + + +As you can observe, even when the app is closed, the previous counter value persists when the app is launched again. The value was retrieved from the device storage. This is due to the shared_preferences plugin that we used. \ No newline at end of file diff --git a/Android_Development_With_Flutter/07_Plugins_In_Flutter/01_Shared_Preference/assets/finalG.gif b/Android_Development_With_Flutter/07_Plugins_In_Flutter/01_Shared_Preference/assets/finalG.gif new file mode 100644 index 0000000000..4a052df963 Binary files /dev/null and b/Android_Development_With_Flutter/07_Plugins_In_Flutter/01_Shared_Preference/assets/finalG.gif differ diff --git a/Android_Development_With_Flutter/08_Assets_In_Flutter/01_Assets_In_Flutter/asset.md b/Android_Development_With_Flutter/08_Assets_In_Flutter/01_Assets_In_Flutter/asset.md new file mode 100644 index 0000000000..ea081ac87e --- /dev/null +++ b/Android_Development_With_Flutter/08_Assets_In_Flutter/01_Assets_In_Flutter/asset.md @@ -0,0 +1,147 @@ +# Assets in Flutter +In Android development in Flutter, we’d have resources, also referred to as **assets**, for our app. Assets include images, files, logo or data. Assets belong to AssetBundle class. These resources have asynchronous access so they will be transparently loaded over a network (e.g., from a NetworkAssetBundle) or from the local file system without blocking the application's interface + +Applications contain a **rootBundle**, which have the resources that were packaged with the application when it was built. To add resources to the rootBundle for your application we specify assets under the flutter subsection in the *pubspec.yaml file*. + +## Specifying Assets +To specify assets we need to add them in the *pubspec.yaml* file under the flutter subsection, which is present in the root of the project. + +Here's a code snippet to demonstrate + +```git +flutter: + assets: + - assets/logo.png + - assets/picture.jpeg +``` +To store all these resources in a directory we need to add the directory name with **a /** at the end. + +``` +flutter: + assets: + - directory/ + - directory/subdirectory/ + +``` +## Asset bundling + +Flutter uses the pubspec.yaml file, present at the root of the project, to specify assets required by an app. The assets subsection basically specifies all the files that have to be included with the application after the build. Flutter places the resources after build in the **“asset bundle”**. This process is thereby called asset bundling. + +## Asset variants + +Asset variants distinguish between main asset and variants. Variants are like different version of assets and their precedence depends on how they are stored in the application directory. + +For example- + +Let’s say if these files are included in your application directory +``` +.../mode/brightmode.png +.../mode /dark/darkmode.png +...etc. +``` +And the pubspec.yaml contains the image called brightmode inside mode folder - + +``` +flutter: + assets: + - mode/ brightmode.png +``` +Then both brightmode.png and darkmode.png would be included in the asset bundle. It’s just that brightmode.png would be the main asset and darkmode.png would be a variant. + +(Precedence would go according to the file path. In simple terms the shortest path file is the main asset here) + +Asset variants is used to categorize among resources and this mechanism might be extended to include variants for different locales or regions, reading directions, and so on. + +## Loading Assets + +### 1) Images + +While our images or resources are stored in the asset folder, to actually access it and load it we need to use **AssetImage** class in the our *build()* function. + +This code snippet shows us how can we load an image +``` +Widget build(BuildContext context) { + return Image(image: AssetImage(‘mode/ brightmode.png’)); +} +``` +In Flutter we can load images according to the resolution for the desired device and its pixel ratio. The numeric identifiers correspond to the resolution of the images contained within i.e they specify the pixels of the device and the images corresponding to that. + +For Example, let’s have a look at this asset layout of an image *my_logo.png* + +``` +.../my_logo.png +.../2.0x/my_logo.png +.../3.0x/my_logo.png +``` +Here the main asset is **my_logo.png** which has the resolution 1. On devices with higher pixel ratio like for pixel ratio 1.7 the higher resolution picture **2.0x/my_icon.png** would be taken. + + + ### Asset Images in Package Dependencies + + When the assets are being used by the package then we need to fetch or load the asset using package argument provided to the **AssetImage** class. + +For Example we have an image by the path *logo/my_logo.png* and the application depends on the package named *logo_set*. Then to load the image we will use the package argument as - + +``` +AssetImage('logo/my_logo.png', package: 'logo_set') +``` + +## Bundling of package Asset + +As we know that the assets specified in pubspec.yaml are bundled automatically with the application. +But, the assets that are not specified in the *pubspec.yaml* file can also be bundled in the application present in the **lib**/ folder. We just have to specify the files present inside the lib folder of the package in the pubspec.yaml file within the assets section. + +If the package has the subsequent files - +``` +.../lib/backgrounds/background1.png +.../lib/backgrounds/background2.png +``` +Then if we want to specify the first image, then we need to specify it in *pubspec.yaml* under assets section as shown - +``` +flutter: + assets: + - packages/package_name/backgrounds/background1.png +``` +The **lib**/ is inferred, so it should be excluded in the asset path. + + +## Sharing assets with the underlying platform + +## Android + +Flutter assets can be shared and used on various platforms by using **AssetManager** Class in Android and **NSBundle** on ios. +On Android the assets are available by the *AssetManager* API. + +For Example, we've got specified the subsequent asset in pubspec.yaml +``` +flutter: + assets: + - mode/brightmode.png + +``` +Now the directory structure would seem like this +``` +.../pubspec.yaml +.../mode/brightmode.png +...etc. +``` +Now to access *mode/brightmode.png* from the Java plugin code we would do the subsequent- +``` +AssetManager assetManager = registrar.context().getAssets(); +String key = registrar.lookupKeyForAsset("mode/brightmode.png"); +AssetFileDescriptor fd = assetManager.openFd(key); +``` +The lookup key employed in, for example openFd, is obtained from lookupKeyForAsset on *PluginRegistry. Registrar* or *getLookupKeyForAsset* on *FlutterView.* **PluginRegistry.Registrar** is available when developing a plugin while FlutterView would be the selection when developing an app including a platform view. + +## Ios platform + +On IOS the assets are available through the **mainBundle.** The lookup key employed in, as an example **pathForResource:ofType:**, is obtained from **lookupKeyForAsset or lookupKeyForAsset:fromPackage:** on *FlutterPluginRegistrar*, or *lookupKeyForAsset:* or *lookupKeyForAsset:fromPackage:* on **FlutterViewController**. **FlutterPluginRegistrar** is accessible when developing a plugin while FlutterViewController would be the selection when developing an app including a platform view. + +We will take the identical example as above for the asset section in pubspec.yaml + +Now to access *mode/brightmode.png* from your Objective-C plugin code we might do the following: +``` +NSString* key = [registrar lookupKeyForAsset:@" mode/brightmode.png "]; +NSString* path = [[NSBundle mainBundle] pathForResource:key ofType:nil]; + +``` diff --git a/Android_Development_With_Flutter/08_Assets_In_Flutter/02_Flutter_Dealing_with_Assets_Video/README.md b/Android_Development_With_Flutter/08_Assets_In_Flutter/02_Flutter_Dealing_with_Assets_Video/README.md new file mode 100644 index 0000000000..a0bc16fc24 --- /dev/null +++ b/Android_Development_With_Flutter/08_Assets_In_Flutter/02_Flutter_Dealing_with_Assets_Video/README.md @@ -0,0 +1,17 @@ + +### FLUTTER DEALING WITH ASSETS VIDEO + +- In these videos I have explained about Specifying Assets, Asset Bundeling, Asset Variants, Loading Assets by using different font styles and images and also provided a simple approach on how to use them while developing a flutter app + +- PART 1 ADDING IMAGES AS ASSETS +- Youtube Link: + + https://youtu.be/liNuzne2SWw + + https://youtu.be/QsqpsRSLWmo + + +- PART 2 ADDING TEXTS AS ASSETS +- YOUTUBE LINK + + https://youtu.be/g4BIw5lWO2c diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/01_Navigation_in_Flutter.md b/Android_Development_With_Flutter/09_Flutter_Navigation/01_Navigation_in_Flutter.md new file mode 100644 index 0000000000..cb084341cd --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/01_Navigation_in_Flutter.md @@ -0,0 +1,130 @@ +

Flutter: Navigation

+

+ Flutter logo +

+

What is navigation in flutter? +

+

In any typical mobile app, you must have noticed that there are different screens for displaying different types of information.Navigation is a process which allows the user to move between the different pages/screens. Eg: An app may display different food items (as a menu) and clicking on any of the image will show more information about it, like ingredients etc.

+

- Routing :

+

The screens and pages, in flutter, are known as routes.These routes are just a widget. In Android, a route is similar to an Activity, whereas, in iOS, it is equivalent to a ViewController. +The workflow of any app is defined by its navigation and routing is the process to handle it. +

+

Approach to use Navigation +

+

+ Flutter logo +

+

MaterialPageRoute and its two methods Navigator.push() and Navigator.pop() are useful to navigate between two routes.Follow these steps to introduce navigation in your application:

+

Step -1 :Create a new flutter project

+

create a folder inside the lib folder called pages and create two screens inside that folder.

+

HomeScreen.dart

+

SecondScreen.dart

+

Step -2 :Code the SecondScreen.dart file

+ +```dart +import 'package:flutter/material.dart'; + +class SecondScreen extends StatelessWidget { + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text('Second Screen'), + ), + body: Center( + child: RaisedButton( + child: Text('Back To HomeScreen'), + color: Theme.of(context).primaryColor, + textColor: Colors.white, + onPressed: () => Navigator.pop(context) + ), + ), + ); + } +} +``` + +This is the SecondScreen.On pressing the button here, the user will go one step back of the screen. Then, we pop the route from the stack and get back to the previous route. +In this case, it is a HomeScreen.dart page that we would want to reach to(navigate) after we click the back to HomeScreen button. + + +

Step -3 :Create the HomeScreen.dart file

+ +```dart +import 'package:flutter/material.dart'; + +import './SecondScreen.dart'; + +class HomeScreen extends StatelessWidget { + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text('Home Screen'), + ), + body: Center( + child: RaisedButton( + child: Text('Go to Second Screen'), + color: Theme.of(context).primaryColor, + textColor: Colors.white, + onPressed: () => Navigator.push( + context, + MaterialPageRoute( + builder: (BuildContext context) => SecondScreen(), + ), + ), + ), + ), + ); + } +} +``` + +

When the user clicks the RaisedButton widget, we call the Navigator.push() method and pass the context and MaterialPageRoute parameters. + +The MaterialPageRoute() widget also takes one function argument called the builder, and in that argument, we pass the destination page where we need to navigate to. In our case, it is a second screen, so we have created an instance of SecondScreen, and we have also imported that screen at the top of the file. + +So, when the user clicks on the Go to second screen button, we navigate theren, and when the user clicks the SecondScreen’s button, we will navigate to this screen which is HomeScreen. + +Finally we code the main.dart file.

+ +```dart +import 'package:flutter/material.dart'; + +import './pages/HomeScreen.dart'; + +void main() => runApp(MyApp()); + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + theme: ThemeData(primarySwatch: Colors.deepPurple), home: HomeScreen()); + } +} + +``` + +

Following this approach, you have successfully tried your hands on Navigation in Flutter! +

+ +

Now create many pages in your app and give them a smooth navigation. +

+ +

+ Flutter logo +

+ + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/.gitignore b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/.gitignore new file mode 100644 index 0000000000..dc1e37799e --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/.gitignore @@ -0,0 +1,48 @@ +# 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 + +.DS_Store \ No newline at end of file diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/.metadata b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/.metadata new file mode 100644 index 0000000000..0cba6264dd --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/.metadata @@ -0,0 +1,10 @@ +# 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: fc7015e35aac7ab785e7ae15a47db5c9e669ec7f + channel: beta + +project_type: app diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/README.md b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/README.md new file mode 100644 index 0000000000..7104d32c27 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/README.md @@ -0,0 +1,7 @@ +# MULTISCREEN NAVIGATION IN FLUTTER + +A new Flutter project. + +## MULTI SCREEN NAVIGATION IN FLUTTER + +- [VIDEO LINK](https://drive.google.com/file/d/1wOthuKuREpEM6l6kxC0q0aAcTZgU1URD/view?usp=sharing) diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/analysis_options.yaml b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/analysis_options.yaml new file mode 100644 index 0000000000..61b6c4de17 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/analysis_options.yaml @@ -0,0 +1,29 @@ +# 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/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/.gitignore b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/.gitignore new file mode 100644 index 0000000000..6f568019d3 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/.gitignore @@ -0,0 +1,13 @@ +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/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/build.gradle b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/build.gradle new file mode 100644 index 0000000000..597d4a6671 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/build.gradle @@ -0,0 +1,68 @@ +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 30 + + 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.multi_screen_navigation" + minSdkVersion 16 + targetSdkVersion 30 + 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/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/debug/AndroidManifest.xml b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000000..1c588fcecf --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/AndroidManifest.xml b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..40653ad2d5 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/kotlin/com/example/multi_screen_navigation/MainActivity.kt b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/kotlin/com/example/multi_screen_navigation/MainActivity.kt new file mode 100644 index 0000000000..e5b177d125 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/kotlin/com/example/multi_screen_navigation/MainActivity.kt @@ -0,0 +1,6 @@ +package com.example.multi_screen_navigation + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/res/drawable-v21/launch_background.xml b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000000..f74085f3f6 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/res/drawable/launch_background.xml b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000000..304732f884 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000..db77bb4b7b Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000..17987b79bb Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000000..09d4391482 Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000..d5f1c8d34e Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000000..4d6372eebd Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/res/values-night/styles.xml b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000000..449a9f9308 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/res/values/styles.xml b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000000..d74aa35c28 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/profile/AndroidManifest.xml b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000000..1c588fcecf --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/build.gradle b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/build.gradle new file mode 100644 index 0000000000..24047dce5d --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/build.gradle @@ -0,0 +1,31 @@ +buildscript { + ext.kotlin_version = '1.3.50' + 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/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/gradle.properties b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/gradle.properties new file mode 100644 index 0000000000..94adc3a3f9 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx1536M +android.useAndroidX=true +android.enableJetifier=true diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/gradle/wrapper/gradle-wrapper.properties b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000..bc6a58afdd --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#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/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/settings.gradle b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/settings.gradle new file mode 100644 index 0000000000..44e62bcf06 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/android/settings.gradle @@ -0,0 +1,11 @@ +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/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/.gitignore b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/.gitignore new file mode 100644 index 0000000000..7a7f9873ad --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/.gitignore @@ -0,0 +1,34 @@ +**/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/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Flutter/AppFrameworkInfo.plist b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000000..8d4492f977 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + 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/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Flutter/Debug.xcconfig b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000000..592ceee85b --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Flutter/Release.xcconfig b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000000..592ceee85b --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner.xcodeproj/project.pbxproj b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..59b788e660 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,481 @@ +// !$*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.multiScreenNavigation; + 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.multiScreenNavigation; + 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.multiScreenNavigation; + 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/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..919434a625 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000000..f9b0d7c5ea --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000000..c87d15a335 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner.xcworkspace/contents.xcworkspacedata b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..1d526a16ed --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000000..f9b0d7c5ea --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/AppDelegate.swift b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000000..70693e4a8c --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +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/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..d36b1fab2d --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "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/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000000..dc9ada4725 Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000000..28c6bf0301 Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000000..2ccbfd967d Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000000..f091b6b0bc Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000000..4cde12118d Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000000..d0ef06e7ed Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000000..dcdc2306c2 Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000000..2ccbfd967d Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000000..c8f9ed8f5c Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000000..a6d6b8609d Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000000..a6d6b8609d Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000000..75b2d164a5 Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000000..c4df70d39d Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000000..6a84f41e14 Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000000..d0e1f58536 Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000000..0bedcf2fd4 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "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/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000000..9da19eacad Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000000..9da19eacad Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000000..9da19eacad Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000000..89c2725b70 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# 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/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Base.lproj/LaunchScreen.storyboard b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000000..f2e259c7c9 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Base.lproj/Main.storyboard b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000000..f3c28516fb --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Info.plist b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Info.plist new file mode 100644 index 0000000000..e0fc219491 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + multi_screen_navigation + 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/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Runner-Bridging-Header.h b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000000..308a2a560b --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/lib/main.dart b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/lib/main.dart new file mode 100644 index 0000000000..5dc56ccf68 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/lib/main.dart @@ -0,0 +1,23 @@ +import 'package:flutter/material.dart'; +import 'package:multi_screen_navigation/screen_0.dart'; +import 'package:multi_screen_navigation/screen_1.dart'; +import 'package:multi_screen_navigation/screen_2.dart'; + +void main() => runApp(const MyApp()); + +class MyApp extends StatelessWidget { + const MyApp({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return MaterialApp( + debugShowCheckedModeBanner: false, + initialRoute: '/', + routes: { + '/': (context) => const Screen0(), + '/first': (context) => const Screen1(), + '/second': (context) => const Screen2(), + }, + ); + } +} diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/lib/screen_0.dart b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/lib/screen_0.dart new file mode 100644 index 0000000000..a11ed3bdfd --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/lib/screen_0.dart @@ -0,0 +1,43 @@ +import 'package:flutter/material.dart'; + +class Screen0 extends StatelessWidget { + const Screen0({Key? key}) : super(key: key); + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text("Screen 0"), + backgroundColor: Colors.red, + ), + body: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + ElevatedButton( + child: const Text("Go to Screen 1"), + onPressed: () { + Navigator.pushNamed(context, "/first"); + }, + style: ButtonStyle( + backgroundColor: MaterialStateProperty.all(Colors.blue.shade900), + textStyle: MaterialStateProperty.all(const TextStyle(color: Colors.white), + ), + ), + ), + ElevatedButton( + child: const Text("Go to Screen 2"), + onPressed: () { + Navigator.pushNamed(context, "/second"); + }, + style: ButtonStyle( + backgroundColor: MaterialStateProperty.all(Colors.green), + textStyle: MaterialStateProperty.all(const TextStyle(color: Colors.white), + ), + ), + ), + ], + ), + ), + ); + } +} diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/lib/screen_1.dart b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/lib/screen_1.dart new file mode 100644 index 0000000000..2f70b649c5 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/lib/screen_1.dart @@ -0,0 +1,32 @@ +import 'package:flutter/material.dart'; +import 'package:multi_screen_navigation/screen_2.dart'; + +class Screen1 extends StatelessWidget { + const Screen1({Key? key}) : super(key: key); + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text("Screen 1"), + backgroundColor: Colors.blue.shade900, + ), + body: Center( + child: ElevatedButton( + child: const Text("Go to Screen 2"), + onPressed: () { + Navigator.push(context,MaterialPageRoute(builder: (context) { + return const Screen2(); + }, + ), + ); + }, + style: ButtonStyle( + backgroundColor: MaterialStateProperty.all(Colors.green), + textStyle: MaterialStateProperty.all(const TextStyle(color: Colors.white), + ), + ), + ), + ), + ); + } +} diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/lib/screen_2.dart b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/lib/screen_2.dart new file mode 100644 index 0000000000..cb2075d73d --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/lib/screen_2.dart @@ -0,0 +1,32 @@ +import 'package:flutter/material.dart'; +import 'package:multi_screen_navigation/screen_1.dart'; + +class Screen2 extends StatelessWidget { + const Screen2({Key? key}) : super(key: key); + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text("Screen 2"), + backgroundColor: Colors.green, + ), + body: Center( + child: ElevatedButton( + child: const Text("Go to Screen 1"), + onPressed: () { + Navigator.push(context,MaterialPageRoute(builder: (context) { + return const Screen1(); + }, + ), + ); + }, + style: ButtonStyle( + backgroundColor: MaterialStateProperty.all(Colors.blue.shade900), + textStyle: MaterialStateProperty.all(const TextStyle(color: Colors.white), + ), + ), + ), + ), + ); + } +} diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/.gitignore b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/.gitignore new file mode 100644 index 0000000000..746adbb6b9 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/.gitignore @@ -0,0 +1,7 @@ +# Flutter-related +**/Flutter/ephemeral/ +**/Pods/ + +# Xcode-related +**/dgph +**/xcuserdata/ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Flutter/Flutter-Debug.xcconfig b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Flutter/Flutter-Debug.xcconfig new file mode 100644 index 0000000000..c2efd0b608 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Flutter/Flutter-Debug.xcconfig @@ -0,0 +1 @@ +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Flutter/Flutter-Release.xcconfig b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Flutter/Flutter-Release.xcconfig new file mode 100644 index 0000000000..c2efd0b608 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Flutter/Flutter-Release.xcconfig @@ -0,0 +1 @@ +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Flutter/GeneratedPluginRegistrant.swift b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Flutter/GeneratedPluginRegistrant.swift new file mode 100644 index 0000000000..cccf817a52 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Flutter/GeneratedPluginRegistrant.swift @@ -0,0 +1,10 @@ +// +// Generated file. Do not edit. +// + +import FlutterMacOS +import Foundation + + +func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { +} diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner.xcodeproj/project.pbxproj b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..753660a309 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,572 @@ +// !$*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 /* multi_screen_navigation.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "multi_screen_navigation.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 /* multi_screen_navigation.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 /* multi_screen_navigation.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/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000000..08a7f23d8f --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner.xcworkspace/contents.xcworkspacedata b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..1d526a16ed --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/AppDelegate.swift b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/AppDelegate.swift new file mode 100644 index 0000000000..d53ef64377 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/AppDelegate.swift @@ -0,0 +1,9 @@ +import Cocoa +import FlutterMacOS + +@NSApplicationMain +class AppDelegate: FlutterAppDelegate { + override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + return true + } +} diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..a2ec33f19f --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "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/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png new file mode 100644 index 0000000000..3c4935a7ca Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png new file mode 100644 index 0000000000..ed4cc16421 Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png new file mode 100644 index 0000000000..483be61389 Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png new file mode 100644 index 0000000000..bcbf36df2f Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png new file mode 100644 index 0000000000..9c0a652864 Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png new file mode 100644 index 0000000000..e71a726136 Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png new file mode 100644 index 0000000000..8a31fe2dd3 Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Base.lproj/MainMenu.xib b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Base.lproj/MainMenu.xib new file mode 100644 index 0000000000..537341abf9 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Base.lproj/MainMenu.xib @@ -0,0 +1,339 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Configs/AppInfo.xcconfig b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Configs/AppInfo.xcconfig new file mode 100644 index 0000000000..081b56a999 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Configs/AppInfo.xcconfig @@ -0,0 +1,14 @@ +// 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 = multi_screen_navigation + +// The application's bundle identifier +PRODUCT_BUNDLE_IDENTIFIER = com.example.multiScreenNavigation + +// The copyright displayed in application information +PRODUCT_COPYRIGHT = Copyright © 2021 com.example. All rights reserved. diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Configs/Debug.xcconfig b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Configs/Debug.xcconfig new file mode 100644 index 0000000000..36b0fd9464 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Configs/Debug.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Debug.xcconfig" +#include "Warnings.xcconfig" diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Configs/Release.xcconfig b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Configs/Release.xcconfig new file mode 100644 index 0000000000..dff4f49561 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Configs/Release.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Release.xcconfig" +#include "Warnings.xcconfig" diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Configs/Warnings.xcconfig b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Configs/Warnings.xcconfig new file mode 100644 index 0000000000..42bcbf4780 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Configs/Warnings.xcconfig @@ -0,0 +1,13 @@ +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/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/DebugProfile.entitlements b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/DebugProfile.entitlements new file mode 100644 index 0000000000..dddb8a30c8 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/DebugProfile.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.cs.allow-jit + + com.apple.security.network.server + + + diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Info.plist b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Info.plist new file mode 100644 index 0000000000..4789daa6a4 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Info.plist @@ -0,0 +1,32 @@ + + + + + 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/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/MainFlutterWindow.swift b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/MainFlutterWindow.swift new file mode 100644 index 0000000000..2722837ec9 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/MainFlutterWindow.swift @@ -0,0 +1,15 @@ +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/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Release.entitlements b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Release.entitlements new file mode 100644 index 0000000000..852fa1a472 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/macos/Runner/Release.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.app-sandbox + + + diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/multi_screen_navigation_video.md b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/multi_screen_navigation_video.md new file mode 100644 index 0000000000..6d721357ea --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/multi_screen_navigation_video.md @@ -0,0 +1,5 @@ +# multi_screen_navigation + +MULTI SCREEN NAVIGATION IN FLUTTER + +- [VIDEO LINK](https://drive.google.com/file/d/1wOthuKuREpEM6l6kxC0q0aAcTZgU1URD/view?usp=sharing) diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/pubspec.lock b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/pubspec.lock new file mode 100644 index 0000000000..7cd75b3411 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/pubspec.lock @@ -0,0 +1,167 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + 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" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + fake_async: + dependency: transitive + description: + name: fake_async + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + lints: + dependency: transitive + description: + name: lints + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.11" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.8.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" + 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.3" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.0" + vector_math: + dependency: transitive + description: + name: vector_math + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" +sdks: + dart: ">=2.15.0-178.1.beta <3.0.0" diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/pubspec.yaml b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/pubspec.yaml new file mode 100644 index 0000000000..2931922c31 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/pubspec.yaml @@ -0,0 +1,89 @@ +name: multi_screen_navigation +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.15.0-178.1.beta <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 +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +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.2 + +dev_dependencies: + flutter_test: + sdk: flutter + + # 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: ^1.0.0 + +# 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/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/test/widget_test.dart b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/test/widget_test.dart new file mode 100644 index 0000000000..1e96974b55 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/test/widget_test.dart @@ -0,0 +1,30 @@ +// 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. + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'package:multi_screen_navigation/main.dart'; + +void main() { + testWidgets('Counter increments smoke test', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(const MyApp()); + + // Verify that our counter starts at 0. + expect(find.text('0'), findsOneWidget); + expect(find.text('1'), findsNothing); + + // Tap the '+' icon and trigger a frame. + await tester.tap(find.byIcon(Icons.add)); + await tester.pump(); + + // Verify that our counter has incremented. + expect(find.text('0'), findsNothing); + expect(find.text('1'), findsOneWidget); + }); +} diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/web/favicon.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/web/favicon.png new file mode 100644 index 0000000000..8aaa46ac1a Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/web/favicon.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/web/icons/Icon-192.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/web/icons/Icon-192.png new file mode 100644 index 0000000000..b749bfef07 Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/web/icons/Icon-192.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/web/icons/Icon-512.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/web/icons/Icon-512.png new file mode 100644 index 0000000000..88cfd48dff Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/web/icons/Icon-512.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/web/icons/Icon-maskable-192.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/web/icons/Icon-maskable-192.png new file mode 100644 index 0000000000..eb9b4d76e5 Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/web/icons/Icon-maskable-192.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/web/icons/Icon-maskable-512.png b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/web/icons/Icon-maskable-512.png new file mode 100644 index 0000000000..d69c56691f Binary files /dev/null and b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/web/icons/Icon-maskable-512.png differ diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/web/index.html b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/web/index.html new file mode 100644 index 0000000000..9542ba4e48 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/web/index.html @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + multi_screen_navigation + + + + + + + diff --git a/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/web/manifest.json b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/web/manifest.json new file mode 100644 index 0000000000..7c0a1d50f6 --- /dev/null +++ b/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation/web/manifest.json @@ -0,0 +1,35 @@ +{ + "name": "multi_screen_navigation", + "short_name": "multi_screen_navigation", + "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/Android_Development_With_Flutter/10_Firebase_With_Flutter/Connect app.md b/Android_Development_With_Flutter/10_Firebase_With_Flutter/Connect app.md new file mode 100644 index 0000000000..2881ebfdb4 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/Connect app.md @@ -0,0 +1,82 @@ +# Connect App To Firebase +In this article we will see how to connect your flutter android app to firebase. +### STEP 1: Create Firebase Project +Before adding firebase to flutter app you should create new Firebase Project on your firebase account. +### STEP 2: Register your Flutter app to Firebase +1. In the console of Firebase project click Android app icon. +2. Enter your app's package name - + + •A package name is sometimes referred to as an application ID. + + •Find this package name in your module (app-level) Gradle file, usually app/build.gradle (example package name: com.yourcompany.yourproject). + +3. Enter the app information + + •App nickname: An internal, convenience identifier that is only visible to you in the Firebase console + •Debug signing certificate SHA-1: + Use this command to generate SHA-1 key- + keytool -list -v \-alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore + +4. Register Your App. + +### STEP 3: Add a Firebase configuration file +1. Click Download google-services.json to obtain your Firebase Android config file (google-services.json). +2. Paste this file into android/app folder. +3. To enable firebase services add following commands to Gradle files. + + In your project level gradle file i.e. android/build.gradle add the following commands that are not present. +```gradle +buildscript { + + repositories { + // Check that you have the following line (if not, add it): + google() // Google's Maven repository + } + + // ... + + dependencies { + // ... + + // Add the following line: + classpath 'com.google.gms:google-services:4.3.10' // Google Services plugin + } +} + +allprojects { + // ... + + repositories { + // Check that you have following line (if not, add it): + google() // Google's Maven repository + // ... + } +} +``` +Now in your app level gradle file i.e. android/app/build.gradle apply following gradle plugin. +```gradle +// Add the following line: +apply plugin: 'com.google.gms.google-services' // Google Services plugin + +android { + // ... +} + +// ... +``` +4. Run Flutter Pub Get to get packages. +5. In Firebase console click Next to skip remaining steps. +### STEP 4: Add FlutterFire plugins +In your pubspec.yaml file add following dependencies +```dart +dependencies: + flutter: + sdk: flutter + firebase_core: ^0.4.0+9 + firebase_analytics: ^5.0.2 + firebase_auth: ^0.14.0+5 + cloud_firestore: ^0.12.9+5 + ``` + Now Run Flutter pub get to get all packages. + +### You have successfully connect Firebase to your Flutter App. \ No newline at end of file diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/LinkingUserAccounts.md b/Android_Development_With_Flutter/10_Firebase_With_Flutter/LinkingUserAccounts.md new file mode 100644 index 0000000000..d88969c3f6 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/LinkingUserAccounts.md @@ -0,0 +1,90 @@ +# Linking User Accounts + +This method should be used when you want your users to use multiple authentication providers to sign in to the same account. + +By linking new AuthCredentials to the existing user's accounts, user can later log in to your application using multiple authentication providers. Regardless of the authentication provider they used to sign in, Firebase user ID can be used to identify the users. For example, a user who signed in with an email and password can link a GitHub account and sign in with either method in the future. + +It is **mandatory** for the user to be **logged in** to one of the accounts you want to link the new authentication provider to. The user can then be signed in to the second provider, and pass that AuthCredential to the linkWithCredential method from the existing user(current user instance). + + +### Initially, enable the required authentication providers and provide support for two or more authentication providers in the app + +firebase + +## Linking Google Account + +### Add dependency: +``` +dependencies: + //use the latest version + google_sign_in: "^4.5.1" +``` + +```dart +Future linkAccountWithGoogle(BuildContext context) async { + // get the currently signed in user + User? currentUser = FirebaseAuth.instance.currentUser; + + // For triggering the authentication flow + final GoogleSignInAccount? googleSignInAccount = await GoogleSignIn().signIn(); + + // Obtain the authentication details from the request + final GoogleSignInAuthentication googleAuthentication = + await googleSignInAccount!.authentication; + + // Create a new OAuthCredential + final OAuthCredential _credential = GoogleAuthProvider.credential( + accessToken: googleAuthentication.accessToken, + idToken: googleAuthentication.idToken, + ); + + //Link current user with these credentials + await currentUser!.linkWithCredential(_credential).whenComplete(() { + print("Linked"); + }); +} +``` + +## Linking Phone Number +```dart +linkAccountWithPhoneNo(String phoneNo) async { + late String verificationId; + final FirebaseAuth _auth = FirebaseAuth.instance; + //get currently logged in user + User? existingUser = _auth.currentUser; + + signIn(AuthCredential authCreds) async { + //now link these credentials with the existing user + await existingUser!.linkWithCredential(authCreds); + } + + //get the credentials of the new account to be linked + final PhoneVerificationCompleted verificationCompleted = + (AuthCredential authCreds) { + signIn(authCreds); + }; + + final PhoneVerificationFailed verificationFailed = (FirebaseAuthException authException) { + print('Verificatin failed, Auth Exception : ${authException.message}'); + }; + + final PhoneCodeSent phoneCodeSent = (String verificationId, int? forceResendingToken) { + print('verification id : $verificationId'); + verificationId = verificationId; + }; + + final PhoneCodeAutoRetrievalTimeout codeAutoRetrievalTimeout = + (String verificationId) { + verificationId = verificationId; + }; + + //verify phone number + await _auth.verifyPhoneNumber( + phoneNumber: phoneNo, + timeout: const Duration(seconds: 30), + verificationCompleted: verificationCompleted, + verificationFailed: verificationFailed, + codeSent: phoneCodeSent, + codeAutoRetrievalTimeout: codeAutoRetrievalTimeout); +} +``` diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/authentication.md b/Android_Development_With_Flutter/10_Firebase_With_Flutter/authentication.md new file mode 100644 index 0000000000..d68b372930 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/authentication.md @@ -0,0 +1,72 @@ +## What is Authentication? +Firebase Authentication provides backend services to authenticate users to your app or web for both android an ios. +It supports authentication using email, passwords, phone numbers, popular credentials from Google, Facebook and Twitter etc.. + +## Installation +Before installing the Authentication plugin, ensure that you have followed the Firebase connection and have initialise the Firebase for your project. + +## Step 1. Add Dependency +- Add the firebase_auth dependency to your projects pubspec.yaml: +``` +dependencies: + flutter: + sdk: flutter + firebase_core: "^0.7.0" + firebase_auth: "^0.20.1" +``` +## Step 2. Download dependency +Download the dependency by using this command in your project terminal: +``` +$ flutter pub get +``` +## Step 3.(Web Only) Add the SDK +If you are using on the web, add the firebase-auth JavaScript SDK to your index.html: +```dart + + ... + + + + + +``` +## Step 4. Flutter run +``` +$ flutter run +``` +### Let's go with an example of connecting Google Signin +Google signin imposed in flutter app or web via getting **Credentials from google** called as +- signInWithCredential +## 1. Add dependency: +``` +dependencies: + google_sign_in: "^4.5.1" +``` +### 2.Enabling the provider +Before get into coding you should make sure that you have enabled Google in Firebase of your project +firebase + +## 3. Next step +```dart +import 'package:google_sign_in/google_sign_in.dart'; + +Future signInWithGoogle() async { + final GoogleSignInAccount? googleUser = await GoogleSignIn().signIn(); + final GoogleSignInAuthentication? googleAuth = await googleUser?.authentication; + final credential = GoogleAuthProvider.credential( + accessToken: googleAuth?.accessToken, + idToken: googleAuth?.idToken, + ); + return await FirebaseAuth.instance.signInWithCredential(credential); +} +``` +In case of web you should create a Google auth provider +```dart +GoogleAuthProvider googleProvider = GoogleAuthProvider(); + +googleProvider.addScope('https://www.googleapis.com/auth/contacts.readonly'); +googleProvider.setCustomParameters({ + 'login_hint': 'user@example.com' +}); +``` +**Yes now you have learnt how to use Authentication in Flutter for both android and web.** diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/.gitignore b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/.gitignore new file mode 100644 index 0000000000..0fa6b675c0 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/.gitignore @@ -0,0 +1,46 @@ +# 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/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/.metadata b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/.metadata new file mode 100644 index 0000000000..a5584fc372 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/.metadata @@ -0,0 +1,10 @@ +# 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: 18116933e77adc82f80866c928266a5b4f1ed645 + channel: stable + +project_type: app diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/README.md b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/README.md new file mode 100644 index 0000000000..0e21308dc5 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/README.md @@ -0,0 +1,16 @@ +# google_auth + +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/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/analysis_options.yaml b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/analysis_options.yaml new file mode 100644 index 0000000000..61b6c4de17 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/analysis_options.yaml @@ -0,0 +1,29 @@ +# 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/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/.gitignore b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/.gitignore new file mode 100644 index 0000000000..6f568019d3 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/.gitignore @@ -0,0 +1,13 @@ +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/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/build.gradle b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/build.gradle new file mode 100644 index 0000000000..89b9f8e62d --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/build.gradle @@ -0,0 +1,71 @@ +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: 'com.google.gms.google-services' +apply plugin: 'kotlin-android' +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" + +android { + compileSdkVersion 30 + + 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.google_auth" + minSdkVersion 20 + targetSdkVersion 30 + 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" + implementation platform('com.google.firebase:firebase-bom:29.0.0') + implementation 'com.google.firebase:firebase-analytics' +} diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/google-services.json b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/google-services.json new file mode 100644 index 0000000000..67d25c293e --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/google-services.json @@ -0,0 +1,76 @@ +{ + "project_info": { + "project_number": "430055819046", + "project_id": "gwoc-auth", + "storage_bucket": "gwoc-auth.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:430055819046:android:86ee31b25f38d03ab6e3e7", + "android_client_info": { + "package_name": "com.android.application" + } + }, + "oauth_client": [ + { + "client_id": "430055819046-673jtsqcpln30tfm0ohvecasvkvjk3cu.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyBPQd2IGHrPX_uPSHo28eEXkQlSFTh-l6g" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "430055819046-673jtsqcpln30tfm0ohvecasvkvjk3cu.apps.googleusercontent.com", + "client_type": 3 + } + ] + } + } + }, + { + "client_info": { + "mobilesdk_app_id": "1:430055819046:android:207d35b11b0f5ee5b6e3e7", + "android_client_info": { + "package_name": "com.example.google_auth" + } + }, + "oauth_client": [ + { + "client_id": "430055819046-js4ko7b0jmrhi42lr2d32k19hct1qbcd.apps.googleusercontent.com", + "client_type": 1, + "android_info": { + "package_name": "com.example.google_auth", + "certificate_hash": "f51b75e1771822b726abb7f91333fa745f0e399c" + } + }, + { + "client_id": "430055819046-673jtsqcpln30tfm0ohvecasvkvjk3cu.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyBPQd2IGHrPX_uPSHo28eEXkQlSFTh-l6g" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "430055819046-673jtsqcpln30tfm0ohvecasvkvjk3cu.apps.googleusercontent.com", + "client_type": 3 + } + ] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/debug/AndroidManifest.xml b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000000..25f56c4e47 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/AndroidManifest.xml b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..0916f0b0b1 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/kotlin/com/example/google_auth/MainActivity.kt b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/kotlin/com/example/google_auth/MainActivity.kt new file mode 100644 index 0000000000..9cf67336e7 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/kotlin/com/example/google_auth/MainActivity.kt @@ -0,0 +1,6 @@ +package com.example.google_auth + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/res/drawable-v21/launch_background.xml b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000000..f74085f3f6 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/res/drawable/launch_background.xml b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000000..304732f884 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000..db77bb4b7b Binary files /dev/null and b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000..17987b79bb Binary files /dev/null and b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000000..09d4391482 Binary files /dev/null and b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000..d5f1c8d34e Binary files /dev/null and b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000000..4d6372eebd Binary files /dev/null and b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/res/values-night/styles.xml b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000000..449a9f9308 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/res/values/styles.xml b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000000..d74aa35c28 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/profile/AndroidManifest.xml b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000000..25f56c4e47 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/build.gradle b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/build.gradle new file mode 100644 index 0000000000..86925a27c6 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/build.gradle @@ -0,0 +1,30 @@ +buildscript { + ext.kotlin_version = '1.3.50' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:4.1.0' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + classpath 'com.google.gms:google-services:4.3.10' + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" + project.evaluationDependsOn(':app') +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/gradle.properties b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/gradle.properties new file mode 100644 index 0000000000..94adc3a3f9 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx1536M +android.useAndroidX=true +android.enableJetifier=true diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/gradle/wrapper/gradle-wrapper.properties b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000..bc6a58afdd --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#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/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/settings.gradle b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/settings.gradle new file mode 100644 index 0000000000..44e62bcf06 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/android/settings.gradle @@ -0,0 +1,11 @@ +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/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/.gitignore b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/.gitignore new file mode 100644 index 0000000000..7a7f9873ad --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/.gitignore @@ -0,0 +1,34 @@ +**/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/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Flutter/AppFrameworkInfo.plist b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000000..8d4492f977 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + 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/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Flutter/Debug.xcconfig b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000000..592ceee85b --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Flutter/Release.xcconfig b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000000..592ceee85b --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner.xcodeproj/project.pbxproj b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..cfc78d562a --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,471 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + 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 = 1020; + 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.googleAuth; + 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_OPTIMIZATION_LEVEL = "-Owholemodule"; + 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.googleAuth; + 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.googleAuth; + 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/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..919434a625 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000000..f9b0d7c5ea --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000000..a28140cfdb --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner.xcworkspace/contents.xcworkspacedata b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..1d526a16ed --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000000..f9b0d7c5ea --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/AppDelegate.swift b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000000..70693e4a8c --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +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/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..d36b1fab2d --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "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/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000000..dc9ada4725 Binary files /dev/null and b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000000..28c6bf0301 Binary files /dev/null and b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000000..2ccbfd967d Binary files /dev/null and b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000000..f091b6b0bc Binary files /dev/null and b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000000..4cde12118d Binary files /dev/null and b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000000..d0ef06e7ed Binary files /dev/null and b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000000..dcdc2306c2 Binary files /dev/null and b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000000..2ccbfd967d Binary files /dev/null and b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000000..c8f9ed8f5c Binary files /dev/null and b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000000..a6d6b8609d Binary files /dev/null and b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000000..a6d6b8609d Binary files /dev/null and b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000000..75b2d164a5 Binary files /dev/null and b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000000..c4df70d39d Binary files /dev/null and b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000000..6a84f41e14 Binary files /dev/null and b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000000..d0e1f58536 Binary files /dev/null and b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000000..0bedcf2fd4 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "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/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000000..9da19eacad Binary files /dev/null and b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000000..9da19eacad Binary files /dev/null and b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000000..9da19eacad Binary files /dev/null and b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000000..89c2725b70 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# 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/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Base.lproj/LaunchScreen.storyboard b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000000..f2e259c7c9 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Base.lproj/Main.storyboard b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000000..f3c28516fb --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Info.plist b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Info.plist new file mode 100644 index 0000000000..1a0ac28ba8 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + google_auth + 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/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Runner-Bridging-Header.h b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000000..308a2a560b --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/lib/auth.dart b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/lib/auth.dart new file mode 100644 index 0000000000..3d4e8440f0 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/lib/auth.dart @@ -0,0 +1,51 @@ +import 'package:firebase_auth/firebase_auth.dart'; +import 'package:google_sign_in/google_sign_in.dart'; + +final FirebaseAuth _auth = FirebaseAuth.instance; +final GoogleSignIn googleSignIn = GoogleSignIn(); + +String name = ""; +String email = ""; +String imgurl = ""; +//Sign In function +Future signin() async { + //signin option of different email acc + try { + final GoogleSignInAccount? googleSignInAccount = + await googleSignIn.signIn(); + + //authentication of the email + final GoogleSignInAuthentication googleSignInAuthentication = + await googleSignInAccount!.authentication; + + // creating credential for a user same as recipt that user is been verified + final AuthCredential credential = GoogleAuthProvider.credential( + idToken: googleSignInAuthentication.idToken, + accessToken: googleSignInAuthentication.accessToken, + ); + + //Google Authenticate the user and provide credential to put that particular user in the firabase database + //After the user is been aurthenticated firebase creates users account + + //creating user class to return + final userCredential = await _auth.signInWithCredential(credential); + final User? user = await userCredential.user; + + //final checking that user is not anonymous + + //checking currentuser is same as user we created + final User? currentuser = await _auth.currentUser; + assert(currentuser!.uid == user!.uid); + print(user); + + return user; + } catch (e) { + print(e); + } +} + +Future signout() async { + await googleSignIn.signOut(); + await _auth.signOut(); + return "done"; +} diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/lib/home.dart b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/lib/home.dart new file mode 100644 index 0000000000..dd1f43a066 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/lib/home.dart @@ -0,0 +1,68 @@ +import 'package:firebase_auth/firebase_auth.dart'; +import 'package:flutter/material.dart'; + +import 'auth.dart'; +import 'login.dart'; + +class HomeFire extends StatefulWidget { + @override + State createState() => _HomeFireState(); +} + +class _HomeFireState extends State { + signoutmethod(context) async { + await signout(); + Navigator.pushReplacement( + context, + MaterialPageRoute( + builder: (context) => Login(), + ), + ); + } + + @override + void initState() { + super.initState(); + final FirebaseAuth auth = FirebaseAuth.instance; + final user = auth.currentUser; + name = user!.displayName.toString(); + email = user.email.toString(); + imgurl = user.photoURL.toString(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("Firebase Authentication"), + ), + body: SafeArea( + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + CircleAvatar( + radius: 50, + backgroundImage: NetworkImage(imgurl), + ), + Text( + name, + style: TextStyle(fontSize: 20), + ), + Text( + email, + style: TextStyle(fontSize: 18), + ), + ElevatedButton( + onPressed: () { + signoutmethod(context); + }, + child: Text("Sign out"), + ) + ], + ), + ), + ), + ); + } +} diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/lib/login.dart b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/lib/login.dart new file mode 100644 index 0000000000..4516cb5c28 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/lib/login.dart @@ -0,0 +1,61 @@ +import 'package:firebase_auth/firebase_auth.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_signin_button/flutter_signin_button.dart'; +import 'auth.dart'; +// import 'constant.dart'; +import 'home.dart'; +//import 'localdb.dart'; + +class Login extends StatefulWidget { + @override + _LoginState createState() => _LoginState(); +} + +class _LoginState extends State { + Future checkuserlog() async { + final FirebaseAuth auth = FirebaseAuth.instance; + final user = auth.currentUser; + if (user != null) { + name = user.displayName.toString(); + email = user.email.toString(); + imgurl = user.photoURL.toString(); + Navigator.pushReplacement( + context, + MaterialPageRoute( + builder: (context) => HomeFire(), + ), + ); + } + } + + void initState() { + super.initState(); + checkuserlog(); + } + + signInMethod() async { + await signin(); + Navigator.pushReplacement( + context, MaterialPageRoute(builder: (context) => HomeFire())); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.grey, + body: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SignInButton( + Buttons.Google, + onPressed: () { + signInMethod(); + }, + ) + ], + ), + ), + ); + } +} diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/lib/main.dart b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/lib/main.dart new file mode 100644 index 0000000000..92da2165f3 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/lib/main.dart @@ -0,0 +1,22 @@ +import 'package:flutter/material.dart'; +import 'package:firebase_core/firebase_core.dart'; +import 'login.dart'; + +Future main() async { + WidgetsFlutterBinding.ensureInitialized(); + await Firebase.initializeApp(); + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + title: "Firebase", + theme: ThemeData( + primarySwatch: Colors.purple, + ), + home: Login(), + ); + } +} diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/pubspec.lock b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/pubspec.lock new file mode 100644 index 0000000000..34627135ad --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/pubspec.lock @@ -0,0 +1,271 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.8.1" + 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.1.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" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + fake_async: + dependency: transitive + description: + name: fake_async + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" + firebase_auth: + dependency: "direct main" + description: + name: firebase_auth + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.0" + firebase_auth_platform_interface: + dependency: transitive + description: + name: firebase_auth_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "6.1.4" + firebase_auth_web: + dependency: transitive + description: + name: firebase_auth_web + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.0" + firebase_core: + dependency: "direct main" + description: + name: firebase_core + url: "https://pub.dartlang.org" + source: hosted + version: "1.10.0" + firebase_core_platform_interface: + dependency: transitive + description: + name: firebase_core_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "4.1.0" + firebase_core_web: + dependency: transitive + description: + name: firebase_core_web + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_signin_button: + dependency: "direct main" + description: + name: flutter_signin_button + url: "https://pub.dartlang.org" + source: hosted + version: "2.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" + font_awesome_flutter: + dependency: transitive + description: + name: font_awesome_flutter + url: "https://pub.dartlang.org" + source: hosted + version: "9.2.0" + google_sign_in: + dependency: "direct main" + description: + name: google_sign_in + url: "https://pub.dartlang.org" + source: hosted + version: "5.2.1" + google_sign_in_platform_interface: + dependency: transitive + description: + name: google_sign_in_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + google_sign_in_web: + dependency: transitive + description: + name: google_sign_in_web + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.0+3" + 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" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.10" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.8.0" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.2" + quiver: + dependency: transitive + description: + name: quiver + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1+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" + 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.2" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.0" + vector_math: + dependency: transitive + description: + name: vector_math + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" +sdks: + dart: ">=2.14.0 <3.0.0" + flutter: ">=2.5.0" diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/pubspec.yaml b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/pubspec.yaml new file mode 100644 index 0000000000..f2227dfdf0 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/pubspec.yaml @@ -0,0 +1,68 @@ +name: many_apps +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.12.0 <3.0.0" + +dependencies: + cupertino_icons: ^1.0.2 + firebase_auth: ^3.2.0 + firebase_core: ^1.10.0 + flutter: + sdk: flutter + flutter_signin_button: ^2.0.0 + google_sign_in: ^5.2.1 +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_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/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/test/lib/Firebase/home.dart b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/test/lib/Firebase/home.dart new file mode 100644 index 0000000000..dab87d0b2d --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/test/lib/Firebase/home.dart @@ -0,0 +1,68 @@ +import 'package:firebase_auth/firebase_auth.dart'; +import 'package:flutter/material.dart'; + +import '../services/auth.dart'; +import 'login.dart'; + +class HomeFire extends StatefulWidget { + @override + State createState() => _HomeFireState(); +} + +class _HomeFireState extends State { + signoutmethod(context) async { + await signout(); + Navigator.pushReplacement( + context, + MaterialPageRoute( + builder: (context) => Login(), + ), + ); + } + + @override + void initState() { + super.initState(); + final FirebaseAuth auth = FirebaseAuth.instance; + final user = auth.currentUser; + name = user!.displayName.toString(); + email = user.email.toString(); + imgurl = user.photoURL.toString(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("Firebase Authentication"), + ), + body: SafeArea( + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + CircleAvatar( + radius: 50, + backgroundImage: NetworkImage(imgurl), + ), + Text( + name, + style: TextStyle(fontSize: 20), + ), + Text( + email, + style: TextStyle(fontSize: 18), + ), + ElevatedButton( + onPressed: () { + signoutmethod(context); + }, + child: Text("Sign out"), + ) + ], + ), + ), + ), + ); + } +} diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/test/lib/Firebase/login.dart b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/test/lib/Firebase/login.dart new file mode 100644 index 0000000000..dec02c6352 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/test/lib/Firebase/login.dart @@ -0,0 +1,61 @@ +import 'package:firebase_auth/firebase_auth.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_signin_button/flutter_signin_button.dart'; +// import 'constant.dart'; +import '../services/auth.dart'; +import 'home.dart'; +//import 'localdb.dart'; + +class Login extends StatefulWidget { + @override + _LoginState createState() => _LoginState(); +} + +class _LoginState extends State { + Future checkuserlog() async { + final FirebaseAuth auth = FirebaseAuth.instance; + final user = auth.currentUser; + if (user != null) { + name = user.displayName.toString(); + email = user.email.toString(); + imgurl = user.photoURL.toString(); + Navigator.pushReplacement( + context, + MaterialPageRoute( + builder: (context) => HomeFire(), + ), + ); + } + } + + void initState() { + super.initState(); + checkuserlog(); + } + + signInMethod() async { + await signin(); + Navigator.pushReplacement( + context, MaterialPageRoute(builder: (context) => HomeFire())); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.grey, + body: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SignInButton( + Buttons.Google, + onPressed: () { + signInMethod(); + }, + ) + ], + ), + ), + ); + } +} diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/test/lib/generated_plugin_registrant.dart b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/test/lib/generated_plugin_registrant.dart new file mode 100644 index 0000000000..e7e7ce6f51 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/test/lib/generated_plugin_registrant.dart @@ -0,0 +1,20 @@ +// +// Generated file. Do not edit. +// + +// ignore_for_file: directives_ordering +// ignore_for_file: lines_longer_than_80_chars + +import 'package:firebase_auth_web/firebase_auth_web.dart'; +import 'package:firebase_core_web/firebase_core_web.dart'; +import 'package:google_sign_in_web/google_sign_in_web.dart'; + +import 'package:flutter_web_plugins/flutter_web_plugins.dart'; + +// ignore: public_member_api_docs +void registerPlugins(Registrar registrar) { + FirebaseAuthWeb.registerWith(registrar); + FirebaseCoreWeb.registerWith(registrar); + GoogleSignInPlugin.registerWith(registrar); + registrar.registerMessageHandler(); +} diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/test/lib/main.dart b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/test/lib/main.dart new file mode 100644 index 0000000000..acc97c6980 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/test/lib/main.dart @@ -0,0 +1,23 @@ +import 'package:flutter/material.dart'; +import 'package:firebase_core/firebase_core.dart'; +// import 'Firebase/home.dart'; +import 'Firebase/login.dart'; + +Future main() async { + WidgetsFlutterBinding.ensureInitialized(); + await Firebase.initializeApp(); + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + title: "Firebase", + theme: ThemeData( + primarySwatch: Colors.purple, + ), + home: Login(), + ); + } +} diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/test/lib/services/auth.dart b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/test/lib/services/auth.dart new file mode 100644 index 0000000000..3d4e8440f0 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/test/lib/services/auth.dart @@ -0,0 +1,51 @@ +import 'package:firebase_auth/firebase_auth.dart'; +import 'package:google_sign_in/google_sign_in.dart'; + +final FirebaseAuth _auth = FirebaseAuth.instance; +final GoogleSignIn googleSignIn = GoogleSignIn(); + +String name = ""; +String email = ""; +String imgurl = ""; +//Sign In function +Future signin() async { + //signin option of different email acc + try { + final GoogleSignInAccount? googleSignInAccount = + await googleSignIn.signIn(); + + //authentication of the email + final GoogleSignInAuthentication googleSignInAuthentication = + await googleSignInAccount!.authentication; + + // creating credential for a user same as recipt that user is been verified + final AuthCredential credential = GoogleAuthProvider.credential( + idToken: googleSignInAuthentication.idToken, + accessToken: googleSignInAuthentication.accessToken, + ); + + //Google Authenticate the user and provide credential to put that particular user in the firabase database + //After the user is been aurthenticated firebase creates users account + + //creating user class to return + final userCredential = await _auth.signInWithCredential(credential); + final User? user = await userCredential.user; + + //final checking that user is not anonymous + + //checking currentuser is same as user we created + final User? currentuser = await _auth.currentUser; + assert(currentuser!.uid == user!.uid); + print(user); + + return user; + } catch (e) { + print(e); + } +} + +Future signout() async { + await googleSignIn.signOut(); + await _auth.signOut(); + return "done"; +} diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/test/widget_test.dart b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/test/widget_test.dart new file mode 100644 index 0000000000..0daf3ec332 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/test/widget_test.dart @@ -0,0 +1,29 @@ +// 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. + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:many_apps/main.dart'; + +void main() { + testWidgets('Counter increments smoke test', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(MyApp()); + + // Verify that our counter starts at 0. + expect(find.text('0'), findsOneWidget); + expect(find.text('1'), findsNothing); + + // Tap the '+' icon and trigger a frame. + await tester.tap(find.byIcon(Icons.add)); + await tester.pump(); + + // Verify that our counter has incremented. + expect(find.text('0'), findsNothing); + expect(find.text('1'), findsOneWidget); + }); +} diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/web/favicon.png b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/web/favicon.png new file mode 100644 index 0000000000..8aaa46ac1a Binary files /dev/null and b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/web/favicon.png differ diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/web/icons/Icon-192.png b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/web/icons/Icon-192.png new file mode 100644 index 0000000000..b749bfef07 Binary files /dev/null and b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/web/icons/Icon-192.png differ diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/web/icons/Icon-512.png b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/web/icons/Icon-512.png new file mode 100644 index 0000000000..88cfd48dff Binary files /dev/null and b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/web/icons/Icon-512.png differ diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/web/icons/Icon-maskable-192.png b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/web/icons/Icon-maskable-192.png new file mode 100644 index 0000000000..eb9b4d76e5 Binary files /dev/null and b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/web/icons/Icon-maskable-192.png differ diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/web/icons/Icon-maskable-512.png b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/web/icons/Icon-maskable-512.png new file mode 100644 index 0000000000..d69c56691f Binary files /dev/null and b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/web/icons/Icon-maskable-512.png differ diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/web/index.html b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/web/index.html new file mode 100644 index 0000000000..38c07c68f8 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/web/index.html @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + google_auth + + + + + + + diff --git a/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/web/manifest.json b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/web/manifest.json new file mode 100644 index 0000000000..f4851c8d47 --- /dev/null +++ b/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth/web/manifest.json @@ -0,0 +1,35 @@ +{ + "name": "google_auth", + "short_name": "google_auth", + "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/Android_Development_With_Flutter/11_Flutter_projects/.vscode/settings.json b/Android_Development_With_Flutter/11_Flutter_projects/.vscode/settings.json new file mode 100644 index 0000000000..0db587396d --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "cmake.configureOnOpen": true +} \ No newline at end of file diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/.gitignore b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/.gitignore new file mode 100644 index 0000000000..0fa6b675c0 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/.gitignore @@ -0,0 +1,46 @@ +# 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/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/.metadata b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/.metadata new file mode 100644 index 0000000000..783bcdc2a3 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/.metadata @@ -0,0 +1,10 @@ +# 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: 8962f6dc68ec8e2206ac2fa874da4a453856c7d3 + channel: stable + +project_type: app diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/README.md b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/README.md new file mode 100644 index 0000000000..b4d8fd7323 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/README.md @@ -0,0 +1,198 @@ + +# BULB APP + + + + + +
+This project is an simple app, with the bulb image, which consist of switch in it, which is used to on and off the bulb as per our wish.
+ +Whenever we touch or tap on the screen, bulb starts glowing and when tapped again, the bulb stops glowing.
+ +And that's the basic working of this app.
+ + +
+
+ + +## File Structure + +* ASSETS :
This folder contains the image of bulb, in the form of png, which will be used in the bulb app.
+ It basically contains two images of bulb, one is glowing image of bulb, i.e turned in state and other is dark state of bulb, i.e turned off state.
+ Both of this image will be used in two different form to exhibit the app.
+ +* LIB :
This folder mainly contains 2 dart files in it, one is the main.dart file and the other is bulb_on.dart file.
+ Both of the files contain the main code for turning the bulb on and off.
+ +* PUBSPEC.YAML :
Here, in this file, we added the dependencies in assets and google fonts because we've used certain images in our app and also different font, for the betterment of the UI.

And here are the dependencies for the same:
+
+ + + ``` + dependencies: + cupertino_icons: ^1.0.2 + flutter: + sdk: flutter + google_fonts: ^2.1.0 + +dev_dependencies: + flutter_test: + sdk: flutter + +flutter: +uses-material-design: true + assets: + - assets/ + + ``` + + + + ------------------------- + + + +### BULB_ON.DART + + - Here, 'MyApp' detects the stateless widget and stateless widget detects theme.
+ - Stateless widget is the part of the user interface whose configuration information is in the object itself.
+ - Then comes 'MaterialApp', which is basically used for styling or for the theme of the app, its main use is to configure the top-level Navigator to search for routes.
+ - We gave the name of the app as, 'Build App' in the section of 'title' + - Under the theme data, we used 'primaryswatch' which is a material color and is assigned with the color blue.
+ - Then, we made a class, named as, 'OnBulb()', which will be used to define the function inside it to make the bulb glow, or in simple words, it'll be used to pick up an image which consist the glowing bulb image.
+ - Now the OnBulb() class extends the stateful widgets, stateful widget is used when we need to change some part of the UI dynamically during runtime.
+ - Under that class, we created a 'scaffold', which is used to provide many widgets or we can say APIs like Drawer, SnackBar, BottomNavigationBar, FloatingActionButton, AppBar etc., and here we used or created an AppBar, in which we defined with the title text to turn on the bulb, we gave its color as grey and positioned it in center with the google font nunito in white color.
+ - Under the body, 'GestureDetector', we created container to add up the path of image of bulb, which will fetch up the path and show on the screen and it is positioned in the center with defined height and width.
+ - Inside the body, we've used the Navigator function which will change/replace the image on tapping screen, and it'll navigate to the other class, which is defined for off bulb.
+ + ``` + import 'package:bulb_app/main.dart'; +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; + +class OnBulb extends StatefulWidget { + const OnBulb({Key? key}) : super(key: key); + + @override + _MainPage2State createState() => _MainPage2State(); +} + +class _MainPage2State extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.grey[800], + appBar: AppBar( + centerTitle: true, + backgroundColor: Colors.grey[800], + elevation: 0, + title: Text( + "Turn on bulb", + style: GoogleFonts.nunito( + color: Colors.white, fontWeight: FontWeight.normal, fontSize: 20), + ), + ), + body: GestureDetector( + onTap: () { + Navigator.pushReplacement( + context, + PageRouteBuilder( + pageBuilder: (_, __, ___) => OffBulb(), + ), + ); + }, + child: Center( + child: Container( + height: MediaQuery.of(context).size.height / 3, + child: Image.asset("assets/bulb_off.png"), + ), + ), + ), + ); + } +} + + ``` + +
+
+
+ + ### MAIN.DART + + Here, everything is same as above for on_bulb.dart code, just with a little difference of class and the path of the other image, here another class is defined, which has been named as 'OffBulb()' which will, while tapping the screen, will navigate to the other screen . + ``` +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; + +import 'bulb_on.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + debugShowCheckedModeBanner: false, + title: 'Build App', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: OnBulb(), + ); + } +} + +class OffBulb extends StatefulWidget { + const OffBulb({Key? key}) : super(key: key); + + @override + _OffBulbState createState() => _OffBulbState(); +} + +class _OffBulbState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.yellow.shade700, + appBar: AppBar( + centerTitle: true, + backgroundColor: Colors.yellow.shade700, + elevation: 0, + title: Text( + "Turn off bulb", + style: GoogleFonts.nunito( + color: Colors.black, fontWeight: FontWeight.normal, fontSize: 20), + ), + ), + body: GestureDetector( + onTap: () { + Navigator.pushReplacement( + context, + PageRouteBuilder( + pageBuilder: (_, __, ___) => OnBulb(), + )); + }, + child: Center( + child: Container( + height: MediaQuery.of(context).size.height / 3, + child: Image.asset("assets/bulb_on.png"), + ), + ), + ), + ); + } +} + + ``` +
+
+
+ +### To know more about this app and live working of it, here the link for the Bulb app, + +[Video Link](https://watch.screencastify.com/v/GQZrx4z0jw4EuBWN2iqV) diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/.gitignore b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/.gitignore new file mode 100644 index 0000000000..0a741cb43d --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/.gitignore @@ -0,0 +1,11 @@ +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/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/build.gradle b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/build.gradle new file mode 100644 index 0000000000..b61f8816ab --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/build.gradle @@ -0,0 +1,59 @@ +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 30 + + 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.bulb_app" + minSdkVersion 16 + targetSdkVersion 30 + 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/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/debug/AndroidManifest.xml b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000000..c9f7301bad --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/AndroidManifest.xml b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..018880206e --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/kotlin/com/example/bulb_app/MainActivity.kt b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/kotlin/com/example/bulb_app/MainActivity.kt new file mode 100644 index 0000000000..3842ca5e1e --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/kotlin/com/example/bulb_app/MainActivity.kt @@ -0,0 +1,6 @@ +package com.example.bulb_app + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/res/drawable-v21/launch_background.xml b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000000..f74085f3f6 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/res/drawable/launch_background.xml b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000000..304732f884 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000..db77bb4b7b Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000..17987b79bb Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000000..09d4391482 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000..d5f1c8d34e Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000000..4d6372eebd Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/res/values-night/styles.xml b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000000..449a9f9308 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/res/values/styles.xml b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000000..d74aa35c28 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/profile/AndroidManifest.xml b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000000..c9f7301bad --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/build.gradle b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/build.gradle new file mode 100644 index 0000000000..c505a86352 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/build.gradle @@ -0,0 +1,31 @@ +buildscript { + ext.kotlin_version = '1.3.50' + repositories { + google() + jcenter() + } + + dependencies { + classpath 'com.android.tools.build:gradle:4.1.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/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/gradle.properties b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/gradle.properties new file mode 100644 index 0000000000..94adc3a3f9 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx1536M +android.useAndroidX=true +android.enableJetifier=true diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/gradle/wrapper/gradle-wrapper.properties b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000..bc6a58afdd --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#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/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/settings.gradle b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/settings.gradle new file mode 100644 index 0000000000..44e62bcf06 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/android/settings.gradle @@ -0,0 +1,11 @@ +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/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/assets/bulb off.jpg b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/assets/bulb off.jpg new file mode 100644 index 0000000000..feae063e3b Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/assets/bulb off.jpg differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/assets/bulb on.jpg b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/assets/bulb on.jpg new file mode 100644 index 0000000000..8d34ab02ed Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/assets/bulb on.jpg differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/assets/bulb_off.png b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/assets/bulb_off.png new file mode 100644 index 0000000000..ee5fdb56e4 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/assets/bulb_off.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/assets/bulb_on.png b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/assets/bulb_on.png new file mode 100644 index 0000000000..f257540d75 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/assets/bulb_on.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/.gitignore b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/.gitignore new file mode 100644 index 0000000000..e96ef602b8 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/.gitignore @@ -0,0 +1,32 @@ +*.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/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Flutter/AppFrameworkInfo.plist b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000000..9367d483e4 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 8.0 + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Flutter/Debug.xcconfig b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000000..592ceee85b --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Flutter/Release.xcconfig b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000000..592ceee85b --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner.xcodeproj/project.pbxproj b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..6415cfba9f --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,471 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + 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 = 1020; + 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.bulbApp; + 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_OPTIMIZATION_LEVEL = "-Owholemodule"; + 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.bulbApp; + 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.bulbApp; + 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/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..919434a625 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000000..f9b0d7c5ea --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000000..a28140cfdb --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner.xcworkspace/contents.xcworkspacedata b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..1d526a16ed --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000000..f9b0d7c5ea --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/AppDelegate.swift b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000000..70693e4a8c --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +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/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..d36b1fab2d --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "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/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000000..dc9ada4725 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000000..28c6bf0301 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000000..2ccbfd967d Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000000..f091b6b0bc Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000000..4cde12118d Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000000..d0ef06e7ed Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000000..dcdc2306c2 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000000..2ccbfd967d Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000000..c8f9ed8f5c Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000000..a6d6b8609d Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000000..a6d6b8609d Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000000..75b2d164a5 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000000..c4df70d39d Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000000..6a84f41e14 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000000..d0e1f58536 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000000..0bedcf2fd4 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "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/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000000..9da19eacad Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000000..9da19eacad Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000000..9da19eacad Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000000..89c2725b70 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# 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/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Base.lproj/LaunchScreen.storyboard b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000000..f2e259c7c9 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Base.lproj/Main.storyboard b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000000..f3c28516fb --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Info.plist b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Info.plist new file mode 100644 index 0000000000..10b8d30364 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + bulb_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/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Runner-Bridging-Header.h b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000000..308a2a560b --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/lib/bulb_on.dart b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/lib/bulb_on.dart new file mode 100644 index 0000000000..75050da498 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/lib/bulb_on.dart @@ -0,0 +1,45 @@ +import 'package:bulb_app/main.dart'; +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; + +class OnBulb extends StatefulWidget { + const OnBulb({Key? key}) : super(key: key); + + @override + _MainPage2State createState() => _MainPage2State(); +} + +class _MainPage2State extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.grey[800], + appBar: AppBar( + centerTitle: true, + backgroundColor: Colors.grey[800], + elevation: 0, + title: Text( + "Turn on bulb", + style: GoogleFonts.nunito( + color: Colors.white, fontWeight: FontWeight.normal, fontSize: 20), + ), + ), + body: GestureDetector( + onTap: () { + Navigator.pushReplacement( + context, + PageRouteBuilder( + pageBuilder: (_, __, ___) => OffBulb(), + ), + ); + }, + child: Center( + child: Container( + height: MediaQuery.of(context).size.height / 3, + child: Image.asset("assets/bulb_off.png"), + ), + ), + ), + ); + } +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/lib/main.dart b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/lib/main.dart new file mode 100644 index 0000000000..63bcb85d9f --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/lib/main.dart @@ -0,0 +1,63 @@ +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; + +import 'bulb_on.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + debugShowCheckedModeBanner: false, + title: 'Build App', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: OnBulb(), + ); + } +} + +class OffBulb extends StatefulWidget { + const OffBulb({Key? key}) : super(key: key); + + @override + _OffBulbState createState() => _OffBulbState(); +} + +class _OffBulbState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.yellow.shade700, + appBar: AppBar( + centerTitle: true, + backgroundColor: Colors.yellow.shade700, + elevation: 0, + title: Text( + "Turn off bulb", + style: GoogleFonts.nunito( + color: Colors.black, fontWeight: FontWeight.normal, fontSize: 20), + ), + ), + body: GestureDetector( + onTap: () { + Navigator.pushReplacement( + context, + PageRouteBuilder( + pageBuilder: (_, __, ___) => OnBulb(), + )); + }, + child: Center( + child: Container( + height: MediaQuery.of(context).size.height / 3, + child: Image.asset("assets/bulb_on.png"), + ), + ), + ), + ); + } +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/pubspec.lock b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/pubspec.lock new file mode 100644 index 0000000000..923e1df30a --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/pubspec.lock @@ -0,0 +1,273 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.6.1" + 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.1.0" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" + 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" + 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.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" + google_fonts: + dependency: "direct main" + description: + name: google_fonts + 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.3" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.0" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.10" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.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.4" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + path_provider_macos: + dependency: transitive + description: + name: path_provider_macos + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.2" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.3" + pedantic: + dependency: transitive + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.11.1" + platform: + dependency: transitive + description: + name: platform + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.2" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.2" + process: + dependency: transitive + description: + name: process + url: "https://pub.dartlang.org" + source: hosted + version: "4.2.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.3.0" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.0" + vector_math: + dependency: transitive + description: + name: vector_math + 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.2.9" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0" +sdks: + dart: ">=2.13.0 <3.0.0" + flutter: ">=2.0.0" diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/pubspec.yaml b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/pubspec.yaml new file mode 100644 index 0000000000..7e37152238 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/pubspec.yaml @@ -0,0 +1,38 @@ +name: bulb_app +description: A new Flutter application. + +# 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.12.0 <3.0.0" + +dependencies: + cupertino_icons: ^1.0.2 + flutter: + sdk: flutter + google_fonts: ^2.1.0 + +dev_dependencies: + flutter_test: + sdk: flutter + +flutter: + + + uses-material-design: true + assets: + - assets/ \ No newline at end of file diff --git a/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/test/widget_test.dart b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/test/widget_test.dart new file mode 100644 index 0000000000..9ce74df2e8 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/01_bulb_app/test/widget_test.dart @@ -0,0 +1,30 @@ +// 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. + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'package:bulb_app/main.dart'; + +void main() { + testWidgets('Counter increments smoke test', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(MyApp()); + + // Verify that our counter starts at 0. + expect(find.text('0'), findsOneWidget); + expect(find.text('1'), findsNothing); + + // Tap the '+' icon and trigger a frame. + await tester.tap(find.byIcon(Icons.add)); + await tester.pump(); + + // Verify that our counter has incremented. + expect(find.text('0'), findsNothing); + expect(find.text('1'), findsOneWidget); + }); +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/.gitignore b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/.gitignore new file mode 100644 index 0000000000..0fa6b675c0 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/.gitignore @@ -0,0 +1,46 @@ +# 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/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/.metadata b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/.metadata new file mode 100644 index 0000000000..0f055bf163 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/.metadata @@ -0,0 +1,10 @@ +# 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: ffb2ecea5223acdd139a5039be2f9c796962833d + channel: stable + +project_type: app diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/README.md b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/README.md new file mode 100644 index 0000000000..0f0218273f --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/README.md @@ -0,0 +1,16 @@ +# dice_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/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/analysis_options.yaml b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/analysis_options.yaml new file mode 100644 index 0000000000..61b6c4de17 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/analysis_options.yaml @@ -0,0 +1,29 @@ +# 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/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/.gitignore b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/.gitignore new file mode 100644 index 0000000000..6f568019d3 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/.gitignore @@ -0,0 +1,13 @@ +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/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/build.gradle b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/build.gradle new file mode 100644 index 0000000000..49cbca08ed --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/build.gradle @@ -0,0 +1,68 @@ +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 30 + + 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.dice_app" + minSdkVersion 16 + targetSdkVersion 30 + 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/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/debug/AndroidManifest.xml b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000000..a300a12ef4 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/AndroidManifest.xml b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..8860a42be7 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/kotlin/com/example/dice_app/MainActivity.kt b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/kotlin/com/example/dice_app/MainActivity.kt new file mode 100644 index 0000000000..443f437fef --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/kotlin/com/example/dice_app/MainActivity.kt @@ -0,0 +1,6 @@ +package com.example.dice_app + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/res/drawable-v21/launch_background.xml b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000000..f74085f3f6 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/res/drawable/launch_background.xml b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000000..304732f884 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000..db77bb4b7b Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000..17987b79bb Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000000..09d4391482 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000..d5f1c8d34e Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000000..4d6372eebd Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/res/values-night/styles.xml b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000000..449a9f9308 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/res/values/styles.xml b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000000..d74aa35c28 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/profile/AndroidManifest.xml b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000000..a300a12ef4 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/build.gradle b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/build.gradle new file mode 100644 index 0000000000..ed45c65885 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/build.gradle @@ -0,0 +1,29 @@ +buildscript { + ext.kotlin_version = '1.3.50' + 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}" + project.evaluationDependsOn(':app') +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/gradle.properties b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/gradle.properties new file mode 100644 index 0000000000..94adc3a3f9 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx1536M +android.useAndroidX=true +android.enableJetifier=true diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/gradle/wrapper/gradle-wrapper.properties b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000..bc6a58afdd --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#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/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/settings.gradle b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/settings.gradle new file mode 100644 index 0000000000..44e62bcf06 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/android/settings.gradle @@ -0,0 +1,11 @@ +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/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/assets/diceFace-1.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/assets/diceFace-1.png new file mode 100644 index 0000000000..3659d2bb7c Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/assets/diceFace-1.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/assets/diceFace-2.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/assets/diceFace-2.png new file mode 100644 index 0000000000..8aa71d8fb9 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/assets/diceFace-2.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/assets/diceFace-3.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/assets/diceFace-3.png new file mode 100644 index 0000000000..8a75fe47fd Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/assets/diceFace-3.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/assets/diceFace-4.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/assets/diceFace-4.png new file mode 100644 index 0000000000..89189e980b Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/assets/diceFace-4.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/assets/diceFace-5.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/assets/diceFace-5.png new file mode 100644 index 0000000000..b54e3240b3 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/assets/diceFace-5.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/assets/diceFace-6.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/assets/diceFace-6.png new file mode 100644 index 0000000000..e69fda03e9 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/assets/diceFace-6.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/dice_app_video.md b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/dice_app_video.md new file mode 100644 index 0000000000..f39120665c --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/dice_app_video.md @@ -0,0 +1,4 @@ +# Dice Application Video + +- [Dice Application Video](https://drive.google.com/file/d/1XShlgjuHOuXJEHFLkh7y-LxsZL6hbcz2/view?usp=sharing) +- [Dice Application Working Video](https://drive.google.com/file/d/1dC0mxsjbDUbjds-5jQNgQehiWM4wdO0I/view?usp=sharing) diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/.gitignore b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/.gitignore new file mode 100644 index 0000000000..151026b91b --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/.gitignore @@ -0,0 +1,33 @@ +*.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/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Flutter/AppFrameworkInfo.plist b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000000..8d4492f977 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + 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/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Flutter/Debug.xcconfig b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000000..592ceee85b --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Flutter/Release.xcconfig b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000000..592ceee85b --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner.xcodeproj/project.pbxproj b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..626dcc2d7b --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,471 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + 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 = 1020; + 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.diceApp; + 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_OPTIMIZATION_LEVEL = "-Owholemodule"; + 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.diceApp; + 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.diceApp; + 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/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..919434a625 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000000..f9b0d7c5ea --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000000..a28140cfdb --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner.xcworkspace/contents.xcworkspacedata b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..1d526a16ed --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000000..f9b0d7c5ea --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/AppDelegate.swift b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000000..70693e4a8c --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +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/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..d36b1fab2d --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "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/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000000..dc9ada4725 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000000..28c6bf0301 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000000..2ccbfd967d Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000000..f091b6b0bc Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000000..4cde12118d Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000000..d0ef06e7ed Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000000..dcdc2306c2 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000000..2ccbfd967d Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000000..c8f9ed8f5c Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000000..a6d6b8609d Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000000..a6d6b8609d Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000000..75b2d164a5 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000000..c4df70d39d Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000000..6a84f41e14 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000000..d0e1f58536 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000000..0bedcf2fd4 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "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/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000000..9da19eacad Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000000..9da19eacad Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000000..9da19eacad Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000000..89c2725b70 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# 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/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Base.lproj/LaunchScreen.storyboard b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000000..f2e259c7c9 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Base.lproj/Main.storyboard b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000000..f3c28516fb --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Info.plist b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Info.plist new file mode 100644 index 0000000000..9cb0e730b0 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + dice_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/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Runner-Bridging-Header.h b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000000..308a2a560b --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/lib/main.dart b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/lib/main.dart new file mode 100644 index 0000000000..ecc8658880 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/lib/main.dart @@ -0,0 +1,86 @@ +import 'package:flutter/material.dart'; +import 'dart:math'; + +void main() { + runApp(const MyApp()); +} + +class MyApp extends StatelessWidget { + const MyApp({Key? key}) : super(key: key); + + // This widget is the root of your application. + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'Dice App', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: const MyHomePage(title: 'Dice App'), + ); + } +} + +class MyHomePage extends StatefulWidget { + const MyHomePage({Key? key, required this.title}) : super(key: key); + + final String title; + + @override + State createState() => _MyHomePageState(); +} + +class _MyHomePageState extends State { + int up = 2; + int down = 4; + int diceSum = 6; + + rolldice() { + setState(() { + up = Random().nextInt(6) + 1; + down = Random().nextInt(6) + 1; + diceSum = up + down; + }); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + body: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + "Total points = $diceSum", + style: TextStyle(fontSize: 25.0), + ), + SizedBox( + height: 10, + ), + Image(image: AssetImage('assets/diceFace-$up.png')), + SizedBox( + height: 10, + ), + Image(image: AssetImage('assets/diceFace-$down.png')), + SizedBox( + height: 10, + ), + Container( + width: MediaQuery.of(context).size.width / 2, + child: ElevatedButton( + onPressed: () { + rolldice(); + }, + child: Text( + "Roll Dice", + style: TextStyle(fontSize: 20.0), + ), + ), + ), + ], + ), + ), + ); + } +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/pubspec.lock b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/pubspec.lock new file mode 100644 index 0000000000..72d9dc014e --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/pubspec.lock @@ -0,0 +1,167 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.6.1" + 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.1.0" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" + 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" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" + fake_async: + dependency: transitive + description: + name: fake_async + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + lints: + dependency: transitive + description: + name: lints + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.10" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.0" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.8.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" + 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.3.0" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.0" + vector_math: + dependency: transitive + description: + name: vector_math + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" +sdks: + dart: ">=2.12.0 <3.0.0" diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/pubspec.yaml b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/pubspec.yaml new file mode 100644 index 0000000000..73ca8ec595 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/pubspec.yaml @@ -0,0 +1,96 @@ +name: dice_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.12.0 <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 +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +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.2 + +dev_dependencies: + flutter_test: + sdk: flutter + + # 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: ^1.0.0 + +# 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/diceFace-2.png + - assets/diceFace-3.png + - assets/diceFace-4.png + - assets/diceFace-5.png + - assets/diceFace-6.png + - assets/diceFace1.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/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/test/widget_test.dart b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/test/widget_test.dart new file mode 100644 index 0000000000..27146fd670 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/test/widget_test.dart @@ -0,0 +1,30 @@ +// 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. + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'package:dice_app/main.dart'; + +void main() { + testWidgets('Counter increments smoke test', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(const MyApp()); + + // Verify that our counter starts at 0. + expect(find.text('0'), findsOneWidget); + expect(find.text('1'), findsNothing); + + // Tap the '+' icon and trigger a frame. + await tester.tap(find.byIcon(Icons.add)); + await tester.pump(); + + // Verify that our counter has incremented. + expect(find.text('0'), findsNothing); + expect(find.text('1'), findsOneWidget); + }); +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/web/favicon.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/web/favicon.png new file mode 100644 index 0000000000..8aaa46ac1a Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/web/favicon.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/web/icons/Icon-192.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/web/icons/Icon-192.png new file mode 100644 index 0000000000..b749bfef07 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/web/icons/Icon-192.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/web/icons/Icon-512.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/web/icons/Icon-512.png new file mode 100644 index 0000000000..88cfd48dff Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/web/icons/Icon-512.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/web/icons/Icon-maskable-192.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/web/icons/Icon-maskable-192.png new file mode 100644 index 0000000000..eb9b4d76e5 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/web/icons/Icon-maskable-192.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/web/icons/Icon-maskable-512.png b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/web/icons/Icon-maskable-512.png new file mode 100644 index 0000000000..d69c56691f Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/web/icons/Icon-maskable-512.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/web/index.html b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/web/index.html new file mode 100644 index 0000000000..ee7e07b223 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/web/index.html @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + dice_app + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/web/manifest.json b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/web/manifest.json new file mode 100644 index 0000000000..5333deb2a1 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/02_dice_app/web/manifest.json @@ -0,0 +1,35 @@ +{ + "name": "dice_app", + "short_name": "dice_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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/.gitignore b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/.gitignore new file mode 100644 index 0000000000..0fa6b675c0 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/.gitignore @@ -0,0 +1,46 @@ +# 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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/.metadata b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/.metadata new file mode 100644 index 0000000000..be0f63d803 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/.metadata @@ -0,0 +1,10 @@ +# 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: 4cc385b4b84ac2f816d939a49ea1f328c4e0b48e + channel: stable + +project_type: app diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/README.md b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/README.md new file mode 100644 index 0000000000..a73a0e3245 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/README.md @@ -0,0 +1,16 @@ +# whatsapp_clone + +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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/analysis_options.yaml b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/analysis_options.yaml new file mode 100644 index 0000000000..61b6c4de17 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/analysis_options.yaml @@ -0,0 +1,29 @@ +# 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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/.gitignore b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/.gitignore new file mode 100644 index 0000000000..6f568019d3 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/.gitignore @@ -0,0 +1,13 @@ +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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/build.gradle b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/build.gradle new file mode 100644 index 0000000000..3d8d357fcf --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/build.gradle @@ -0,0 +1,68 @@ +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 30 + + 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.whatsapp_clone" + minSdkVersion 16 + targetSdkVersion 30 + 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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/debug/AndroidManifest.xml b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000000..e43e8b6c66 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/AndroidManifest.xml b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..355b3814cf --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/kotlin/com/example/whatsapp_clone/MainActivity.kt b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/kotlin/com/example/whatsapp_clone/MainActivity.kt new file mode 100644 index 0000000000..e2d2ba845a --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/kotlin/com/example/whatsapp_clone/MainActivity.kt @@ -0,0 +1,6 @@ +package com.example.whatsapp_clone + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/res/drawable-v21/launch_background.xml b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000000..f74085f3f6 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/res/drawable/launch_background.xml b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000000..304732f884 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000..db77bb4b7b Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000..17987b79bb Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000000..09d4391482 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000..d5f1c8d34e Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000000..4d6372eebd Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/res/values-night/styles.xml b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000000..449a9f9308 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/res/values/styles.xml b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000000..d74aa35c28 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/profile/AndroidManifest.xml b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000000..e43e8b6c66 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/build.gradle b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/build.gradle new file mode 100644 index 0000000000..ed45c65885 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/build.gradle @@ -0,0 +1,29 @@ +buildscript { + ext.kotlin_version = '1.3.50' + 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}" + project.evaluationDependsOn(':app') +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/gradle.properties b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/gradle.properties new file mode 100644 index 0000000000..94adc3a3f9 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx1536M +android.useAndroidX=true +android.enableJetifier=true diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/gradle/wrapper/gradle-wrapper.properties b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000..bc6a58afdd --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/settings.gradle b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/settings.gradle new file mode 100644 index 0000000000..44e62bcf06 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/android/settings.gradle @@ -0,0 +1,11 @@ +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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/assets/girl.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/assets/girl.png new file mode 100644 index 0000000000..cdc3739956 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/assets/girl.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/assets/men.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/assets/men.png new file mode 100644 index 0000000000..7d470954b5 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/assets/men.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/assets/profile.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/assets/profile.png new file mode 100644 index 0000000000..f177a45b85 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/assets/profile.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/assets/whatsapp_Back.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/assets/whatsapp_Back.png new file mode 100644 index 0000000000..37aa2e6c8c Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/assets/whatsapp_Back.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/.gitignore b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/.gitignore new file mode 100644 index 0000000000..151026b91b --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/.gitignore @@ -0,0 +1,33 @@ +*.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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Flutter/AppFrameworkInfo.plist b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000000..8d4492f977 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + 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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Flutter/Debug.xcconfig b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000000..592ceee85b --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Flutter/Release.xcconfig b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000000..592ceee85b --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner.xcodeproj/project.pbxproj b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..634db0cd56 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,471 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + 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 = 1020; + 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.whatsappClone; + 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_OPTIMIZATION_LEVEL = "-Owholemodule"; + 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.whatsappClone; + 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.whatsappClone; + 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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..919434a625 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000000..f9b0d7c5ea --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000000..a28140cfdb --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner.xcworkspace/contents.xcworkspacedata b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..1d526a16ed --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000000..f9b0d7c5ea --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/AppDelegate.swift b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000000..70693e4a8c --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..d36b1fab2d --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000000..dc9ada4725 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000000..28c6bf0301 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000000..2ccbfd967d Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000000..f091b6b0bc Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000000..4cde12118d Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000000..d0ef06e7ed Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000000..dcdc2306c2 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000000..2ccbfd967d Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000000..c8f9ed8f5c Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000000..a6d6b8609d Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000000..a6d6b8609d Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000000..75b2d164a5 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000000..c4df70d39d Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000000..6a84f41e14 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000000..d0e1f58536 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000000..0bedcf2fd4 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000000..9da19eacad Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000000..9da19eacad Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000000..9da19eacad Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000000..89c2725b70 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# 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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Base.lproj/LaunchScreen.storyboard b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000000..f2e259c7c9 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Base.lproj/Main.storyboard b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000000..f3c28516fb --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Info.plist b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Info.plist new file mode 100644 index 0000000000..b8d546e6c8 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + whatsapp_clone + 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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Runner-Bridging-Header.h b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000000..308a2a560b --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/components/own_message.dart b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/components/own_message.dart new file mode 100644 index 0000000000..4f38c7db0c --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/components/own_message.dart @@ -0,0 +1,57 @@ +import 'package:flutter/material.dart'; + +class OwnMessage extends StatelessWidget { + final message; + final time; + const OwnMessage({Key? key, this.message, this.time}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Align( + alignment: Alignment.centerRight, + child: ConstrainedBox( + constraints: BoxConstraints( + maxWidth: MediaQuery.of(context).size.width - 45, + ), + child: Card( + elevation: 1, + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + color: Color(0xffdcf8c6), + margin: EdgeInsets.symmetric(horizontal: 15, vertical: 5), + child: Stack( + children: [ + Padding( + padding: const EdgeInsets.only( + left: 10, right: 60, top: 5, bottom: 20), + child: Text( + message, + style: TextStyle(fontSize: 16), + ), + ), + Positioned( + bottom: 4, + right: 10, + child: Row( + children: [ + Text( + time, + style: TextStyle(fontSize: 13, color: Colors.grey[600]), + ), + SizedBox( + width: 5, + ), + Icon( + Icons.done_all_rounded, + color: Colors.blue, + size: 20, + ), + ], + ), + ) + ], + ), + ), + ), + ); + } +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/components/reply_message.dart b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/components/reply_message.dart new file mode 100644 index 0000000000..0820a1e7e6 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/components/reply_message.dart @@ -0,0 +1,45 @@ +import 'package:flutter/material.dart'; + +class ReplyMessage extends StatelessWidget { + const ReplyMessage({ + Key? key, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return Align( + alignment: Alignment.centerLeft, + child: ConstrainedBox( + constraints: BoxConstraints( + maxWidth: MediaQuery.of(context).size.width - 45, + ), + child: Card( + elevation: 1, + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + // color: Color(0xffdcf8c6), + margin: EdgeInsets.symmetric(horizontal: 15, vertical: 5), + child: Stack( + children: [ + Padding( + padding: const EdgeInsets.only( + left: 10, right: 60, top: 5, bottom: 20), + child: Text( + "Hey", + style: TextStyle(fontSize: 16), + ), + ), + Positioned( + bottom: 4, + right: 10, + child: Text( + "7:00 PM", + style: TextStyle(fontSize: 13, color: Colors.grey[600]), + ), + ) + ], + ), + ), + ), + ); + } +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/components/temp b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/components/temp new file mode 100644 index 0000000000..5cac141fd0 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/components/temp @@ -0,0 +1,4 @@ +Create all the small components here +Ex: +1. ListTile for each chat +2. ListTile for each status on status page, etc \ No newline at end of file diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/main.dart b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/main.dart new file mode 100644 index 0000000000..9074effe89 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/main.dart @@ -0,0 +1,31 @@ +import 'package:flutter/material.dart'; +import 'package:whatsapp_clone/screens/home_page.dart'; +import 'package:google_fonts/google_fonts.dart'; + +void main() { + runApp(const MyApp()); +} + +class MyApp extends StatelessWidget { + const MyApp({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return MaterialApp( + debugShowCheckedModeBanner: false, + title: 'Flutter Demo', + // whatsapp theme data + theme: ThemeData( + primarySwatch: Colors.teal, + fontFamily: GoogleFonts.roboto().fontFamily, + ), + routes: { + '/': (context) => const MyHomePage( + title: "WhatsApp", + ), + // other routes here + }, + initialRoute: '/', + ); + } +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/models/callmodel.dart b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/models/callmodel.dart new file mode 100644 index 0000000000..a103d59800 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/models/callmodel.dart @@ -0,0 +1,79 @@ +enum Direction{incoming,outgoing} +enum TypeOfCall{voice,video} +class CallModel { + String name = ""; + String day = ""; + String time = ""; + String profile = ""; + Direction direction = Direction.outgoing; + TypeOfCall type = TypeOfCall.voice; + bool callMissed = false; + + CallModel(name, day, time, direction, type, callMissed, profile) { + this.name = name; + this.day = day; + this.time = time; + this.direction=direction; + this.type=type; + this.callMissed = callMissed; + this.profile = profile; + } +} + +//Make sure the profile of names in chatmodel and callmodel are same. +List calldata = [ + CallModel( + "Aachal", + "Today", + "11:00 AM", + Direction.incoming, + TypeOfCall.voice, + true, + "assets/girl.png", + ), + CallModel( + "Ankit", + "Today", + "6:00 PM", + Direction.outgoing, + TypeOfCall.voice, + false, + "assets/profile.png", + ), + CallModel( + "Sakshi", + "Yesterday", + "8:00 PM", + Direction.incoming, + TypeOfCall.voice, + false, + "assets/girl.png", + ), + CallModel( + "Ajinkya", + "Yesterday", + "10:00 AM", + Direction.incoming, + TypeOfCall.video, + true, + "assets/profile.png", + ), + CallModel( + "Pranav", + "Yesterday", + "8:00 AM", + Direction.incoming, + TypeOfCall.voice, + false, + "assets/men.png", + ), + CallModel( + "Dron", + "October 26", + "2:00 PM", + Direction.outgoing, + TypeOfCall.video, + true, + "assets/men.png", + ), +]; diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/models/chatmodel.dart b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/models/chatmodel.dart new file mode 100644 index 0000000000..5a9a6086b3 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/models/chatmodel.dart @@ -0,0 +1,58 @@ +class ChatModel { + String name = ""; + String message = ""; + String time = ""; + String profile = ""; + ChatModel(name, message, time, profile) { + this.name = name; + this.message = message; + this.time = time; + this.profile = profile; + } +} + +//If you want to change the profile images just replace the url. +List chatdata = [ + ChatModel( + "Asmit", + "Hi there", + "10:00 AM", + "assets/profile.png", + ), + ChatModel( + "Pranav", + "So today at 9 PM", + "5:00 PM", + "assets/men.png", + ), + ChatModel( + "Dron", + "Hello", + "7:00 PM", + "assets/men.png", + ), + ChatModel( + "Ajinkya", + "Thanks Bro", + "8:30 AM", + "assets/profile.png", + ), + ChatModel( + "Sakshi", + "Contact Sir", + "11:30 AM", + "assets/girl.png", + ), + ChatModel( + "Ankit", + "Call Dron also", + "12:00 AM", + "assets/profile.png", + ), + ChatModel( + "Aachal", + "Sorry Mam", + "6:30 PM", + "assets/girl.png", + ), +]; diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/models/statusmodel.dart b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/models/statusmodel.dart new file mode 100644 index 0000000000..4ad45e00ec --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/models/statusmodel.dart @@ -0,0 +1,52 @@ +class StatusModel { + String name = ""; + String day = ""; + String time = ""; + String profile = ""; + StatusModel(name, day, time, profile) { + this.name = name; + this.day = day; + this.time = time; + this.profile = profile; + } +} + +//If someone want to change the profile images just change the url for now I have put same url as profile photoes. +List statusdata = [ + StatusModel( + "Dron", + "Today", + "11:00 AM", + "assets/profile.png", + ), + StatusModel( + "Sakshi", + "Yesterday", + "9:00 AM", + "assets/men.png", + ), + StatusModel( + "Asmit", + "Yesterday", + "7:00 PM", + "assets/men.png", + ), + StatusModel( + "Aachal", + "Today", + "10:00 PM", + "assets/profile.png", + ), + StatusModel( + "Pranav", + "Yesterday", + "2:00 PM", + "assets/men.png", + ), + StatusModel( + "Ankit", + "Today", + "4:00 PM", + "assets/men.png", + ), +]; diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/models/temp b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/models/temp new file mode 100644 index 0000000000..d2ea1b5ef5 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/models/temp @@ -0,0 +1,29 @@ +create models here. + +Model - Model here referes as all the harcoded data that you will using in this whatsapp clone + +Ex: + +class ChatModel{ + constructor(id,name,message,time,profilePic){ + this.id = id; + this.name = name; + this.message = message; + this.profilePic = profilePic; + } +} + +List dummyData = [ + new ChatModel( + "1", + "Asmit", + "Hello", + "img url", + ), + new ChatModel( + "2", + "Sachin", + "Hello", + "img url", + ), +] \ No newline at end of file diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/screens/CallScreen.dart b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/screens/CallScreen.dart new file mode 100644 index 0000000000..9b7d6cd2c0 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/screens/CallScreen.dart @@ -0,0 +1,70 @@ +import 'package:flutter/material.dart'; +import 'package:whatsapp_clone/models/callmodel.dart'; + +class CallScreen extends StatefulWidget { + const CallScreen({Key? key}) : super(key: key); + + @override + _CallScreenState createState() => _CallScreenState(); +} + +class _CallScreenState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + body: ListView.builder( + itemCount: calldata.length, + itemBuilder: (context, i) => Column( + children: [ + ListTile( + leading: CircleAvatar( + foregroundColor: Theme.of(context).primaryColor, + backgroundColor: Colors.grey, + backgroundImage: AssetImage(calldata[i].profile), + ), + title: Text( + calldata[i].name, + style: const TextStyle(fontWeight: FontWeight.bold), + ), + subtitle: Container( + padding: const EdgeInsets.only(top: 5.0), + child: Row( + children: [ + Icon( + calldata[i].direction == Direction.incoming + ? Icons.call_received + : Icons.call_made, + color: + calldata[i].callMissed ? Colors.red : Colors.green), + const SizedBox( + width: 10.0, + ), + Text( + calldata[i].day + ", " + calldata[i].time, + style: + const TextStyle(color: Colors.grey, fontSize: 15.0), + ), + ], + )), + trailing: Icon( + calldata[i].type == TypeOfCall.voice?Icons.call:Icons.videocam_rounded, + color: Theme.of(context).primaryColor, + ), + ), + const Divider( + height: 10.0, + ), + ], + ), + ), + floatingActionButton: FloatingActionButton( + onPressed: () {}, + backgroundColor: Theme.of(context).colorScheme.secondary, + child: const Icon( + Icons.add_call, + color: Colors.white, + ), + ), + ); + } +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/screens/ChatScreen.dart b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/screens/ChatScreen.dart new file mode 100644 index 0000000000..f8d3dbb821 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/screens/ChatScreen.dart @@ -0,0 +1,79 @@ +import 'package:flutter/material.dart'; +import 'package:whatsapp_clone/models/chatmodel.dart'; +import 'package:page_transition/page_transition.dart'; + +import 'conversation.dart'; + +class ChatScreen extends StatefulWidget { + const ChatScreen({Key? key}) : super(key: key); + + @override + _ChatScreenState createState() => _ChatScreenState(); +} + +class _ChatScreenState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + body: ListView.builder( + itemCount: chatdata.length, + itemBuilder: (context, index) => Column( + children: [ + Divider( + height: 10.0, + ), + ListTile( + leading: CircleAvatar( + backgroundColor: Colors.blueGrey, + backgroundImage: AssetImage(chatdata[index].profile), + ), + title: Text( + chatdata[index].name, + style: TextStyle(fontWeight: FontWeight.bold), + ), + subtitle: Row( + children: [ + Icon( + Icons.done_all_rounded, + color: Colors.blue, + size: 18, + ), + Text( + chatdata[index].message, + style: TextStyle(color: Colors.grey, fontSize: 14), + ), + ], + ), + trailing: Text( + chatdata[index].time, + style: TextStyle(color: Colors.grey, fontSize: 14.0), + ), + onTap: () { + Navigator.push( + context, + PageTransition( + type: PageTransitionType.rightToLeft, + child: ConverstationPage( + name: chatdata[index].name, + profile: chatdata[index].profile, + message: chatdata[index].message, + time: chatdata[index].time, + ), + ), + ); + }, + ), + ], + ), + ), + floatingActionButton: FloatingActionButton( + onPressed: () {}, + backgroundColor: Theme.of(context).accentColor, + child: Icon( + Icons.message, + color: Colors.white, + ), + ), + ); + } +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/screens/StatusScreen.dart b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/screens/StatusScreen.dart new file mode 100644 index 0000000000..3be02718dd --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/screens/StatusScreen.dart @@ -0,0 +1,23 @@ +import 'package:flutter/material.dart'; +class StatusScreen extends StatefulWidget { + const StatusScreen({Key? key}) : super(key: key); + + @override + _StatusScreenState createState() => _StatusScreenState(); +} + +class _StatusScreenState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + body: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text("Status Screen"), + ], + ), + ), + ); + } +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/screens/conversation.dart b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/screens/conversation.dart new file mode 100644 index 0000000000..a9ffa4b4ab --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/screens/conversation.dart @@ -0,0 +1,194 @@ +import 'package:flutter/material.dart'; +import '../components/own_message.dart'; +import '../components/reply_message.dart'; + +class ConverstationPage extends StatefulWidget { + final name; + final profile; + final message; + final time; + ConverstationPage( + {Key? key, this.name, this.profile, this.message, this.time}) + : super(key: key); + + @override + State createState() => _ConverstationPageState(); +} + +class _ConverstationPageState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + titleSpacing: 0, + leadingWidth: 70, + leading: InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon( + Icons.arrow_back, + size: 24, + ), + CircleAvatar( + backgroundImage: AssetImage(widget.profile), + radius: 20, + ) + ], + ), + ), + title: InkWell( + onTap: () {}, + child: Container( + margin: EdgeInsets.all(6), + child: Column( + children: [ + Text( + widget.name, + style: TextStyle( + fontSize: 18.5, + fontWeight: FontWeight.bold, + ), + ) + ], + ), + ), + ), + actions: [ + IconButton(onPressed: () {}, icon: Icon(Icons.videocam)), + IconButton(onPressed: () {}, icon: Icon(Icons.call)), + PopupMenuButton( + itemBuilder: (BuildContext context) { + return [ + PopupMenuItem(child: Text("View Contact")), + PopupMenuItem(child: Text("Media,links and docs")), + PopupMenuItem(child: Text("Search")), + PopupMenuItem(child: Text("Mute Notifications")), + PopupMenuItem(child: Text("Wallpaper")), + PopupMenuItem(child: Text("More")), + ]; + }, + ) + ], + ), + body: Stack(children: [ + Image.asset( + "assets/whatsapp_Back.png", + height: MediaQuery.of(context).size.height, + width: MediaQuery.of(context).size.width, + fit: BoxFit.cover, + ), + Container( + height: MediaQuery.of(context).size.height, + width: MediaQuery.of(context).size.width, + child: Stack( + children: [ + Padding( + padding: const EdgeInsets.only(bottom: 80.0), + child: Align( + alignment: Alignment.bottomRight, + child: Container( + height: MediaQuery.of(context).size.height - 140, + child: ListView( + shrinkWrap: true, + children: [ + OwnMessage( + message: widget.message, + time: widget.time, + ), + ReplyMessage(), + OwnMessage( + message: widget.message, + time: widget.time, + ), + ReplyMessage(), + OwnMessage( + message: widget.message, + time: widget.time, + ), + ReplyMessage(), + OwnMessage( + message: widget.message, + time: widget.time, + ), + ReplyMessage(), + OwnMessage( + message: widget.message, + time: widget.time, + ), + ReplyMessage(), + OwnMessage( + message: widget.message, + time: widget.time, + ), + ], + ), + ), + ), + ), + Align( + alignment: Alignment.bottomCenter, + child: Row( + children: [ + Container( + width: MediaQuery.of(context).size.width - 60, + child: Card( + child: TextFormField( + keyboardType: TextInputType.multiline, + maxLines: 5, + minLines: 1, + textAlignVertical: TextAlignVertical.center, + decoration: InputDecoration( + border: InputBorder.none, + suffixIcon: Row( + mainAxisSize: MainAxisSize.min, + children: [ + IconButton( + icon: Icon(Icons.attach_file), + onPressed: () {}, + ), + IconButton( + icon: Icon(Icons.camera_alt), + onPressed: () {}, + ), + ], + ), + hintText: "Type a message", + prefixIcon: IconButton( + onPressed: () {}, + icon: Icon(Icons.emoji_emotions_outlined), + ), + contentPadding: EdgeInsets.all(5)), + ), + margin: + EdgeInsets.only(left: 2, right: 2, bottom: 8), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(25), + ), + )), + Padding( + padding: EdgeInsets.only( + bottom: 8, + right: 4, + left: 2, + ), + child: CircleAvatar( + radius: 22, + child: IconButton( + onPressed: () {}, + icon: Icon(Icons.mic), + ), + ), + ), + ], + ), + ), + ], + )), + ]), + ); + } +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/screens/home_page.dart b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/screens/home_page.dart new file mode 100644 index 0000000000..12cbb60b8e --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/screens/home_page.dart @@ -0,0 +1,87 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/rendering.dart'; +import 'package:whatsapp_clone/screens/ChatScreen.dart'; +import 'package:whatsapp_clone/screens/StatusScreen.dart'; +import 'package:whatsapp_clone/screens/CallScreen.dart'; + +class MyHomePage extends StatefulWidget { + const MyHomePage({Key? key, required this.title}) : super(key: key); + + final String title; + + @override + State createState() => _MyHomePageState(); +} + +class _MyHomePageState extends State { + @override + Widget build(BuildContext context) { + double width = MediaQuery.of(context).size.width; + double tabWidth = width / 5; + Widget customSearchBar = Text("WhatsApp"); //Text(widget.title); + + return Scaffold( + body: DefaultTabController( + length: 4, + child: Scaffold( + appBar: AppBar( + title: customSearchBar, + actions: [ + IconButton(onPressed: () {}, icon: Icon(Icons.search)), + PopupMenuButton( + itemBuilder: (BuildContext context) { + return [ + PopupMenuItem(child: Text("New Group")), + PopupMenuItem(child: Text("New Broadcast")), + PopupMenuItem(child: Text("Linked Devices")), + PopupMenuItem(child: Text("Starred messages")), + PopupMenuItem(child: Text("Payments")), + PopupMenuItem(child: Text("Settings")), + ]; + }, + ) + ], + bottom: TabBar( + indicatorSize: TabBarIndicatorSize.label, + isScrollable: true, + tabs: [ + Container( + width: 30, + height: 50, + alignment: Alignment.center, + child: Icon( + Icons.camera_alt, + ), + ), + Container( + width: tabWidth, + height: 50, + alignment: Alignment.center, + child: Text("CHATS")), + Container( + width: tabWidth, + height: 50, + alignment: Alignment.center, + child: Text("STATUS")), + Container( + width: tabWidth, + height: 50, + alignment: Alignment.center, + child: Text("CALLS")) + ], + )), + body: TabBarView( + children: [ + Text( + "Camera Screen", + textAlign: TextAlign.center, + ), + ChatScreen(), + StatusScreen(), + CallScreen(), + ], + )), + ), + ); + } +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/screens/temp b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/screens/temp new file mode 100644 index 0000000000..d7162c3fd5 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/lib/screens/temp @@ -0,0 +1,10 @@ +All the screens here + +Ex- + +ChatScreen +Call Screen +Status Screen +Converstation Screen +Settings Screen +etc \ No newline at end of file diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/linux/.gitignore b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/linux/.gitignore new file mode 100644 index 0000000000..d3896c9844 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/linux/.gitignore @@ -0,0 +1 @@ +flutter/ephemeral diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/linux/CMakeLists.txt b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/linux/CMakeLists.txt new file mode 100644 index 0000000000..d6529f178f --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/linux/CMakeLists.txt @@ -0,0 +1,116 @@ +cmake_minimum_required(VERSION 3.10) +project(runner LANGUAGES CXX) + +set(BINARY_NAME "whatsapp_clone") +set(APPLICATION_ID "com.example.whatsapp_clone") + +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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/linux/flutter/CMakeLists.txt b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/linux/flutter/CMakeLists.txt new file mode 100644 index 0000000000..33fd5801e7 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/linux/flutter/CMakeLists.txt @@ -0,0 +1,87 @@ +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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/linux/flutter/generated_plugin_registrant.cc b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/linux/flutter/generated_plugin_registrant.cc new file mode 100644 index 0000000000..e71a16d23d --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/linux/flutter/generated_plugin_registrant.cc @@ -0,0 +1,11 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#include "generated_plugin_registrant.h" + + +void fl_register_plugins(FlPluginRegistry* registry) { +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/linux/flutter/generated_plugin_registrant.h b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/linux/flutter/generated_plugin_registrant.h new file mode 100644 index 0000000000..e0f0a47bc0 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/linux/flutter/generated_plugin_registrant.h @@ -0,0 +1,15 @@ +// +// 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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/linux/flutter/generated_plugins.cmake b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/linux/flutter/generated_plugins.cmake new file mode 100644 index 0000000000..51436ae8c9 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/linux/flutter/generated_plugins.cmake @@ -0,0 +1,15 @@ +# +# 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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/linux/main.cc b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/linux/main.cc new file mode 100644 index 0000000000..e7c5c54370 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/linux/main.cc @@ -0,0 +1,6 @@ +#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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/linux/my_application.cc b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/linux/my_application.cc new file mode 100644 index 0000000000..6937a91f16 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/linux/my_application.cc @@ -0,0 +1,104 @@ +#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, "whatsapp_clone"); + 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, "whatsapp_clone"); + } + + 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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/linux/my_application.h b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/linux/my_application.h new file mode 100644 index 0000000000..72271d5e41 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/linux/my_application.h @@ -0,0 +1,18 @@ +#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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/.gitignore b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/.gitignore new file mode 100644 index 0000000000..d2fd377230 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/.gitignore @@ -0,0 +1,6 @@ +# Flutter-related +**/Flutter/ephemeral/ +**/Pods/ + +# Xcode-related +**/xcuserdata/ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Flutter/Flutter-Debug.xcconfig b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Flutter/Flutter-Debug.xcconfig new file mode 100644 index 0000000000..c2efd0b608 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Flutter/Flutter-Debug.xcconfig @@ -0,0 +1 @@ +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Flutter/Flutter-Release.xcconfig b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Flutter/Flutter-Release.xcconfig new file mode 100644 index 0000000000..c2efd0b608 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Flutter/Flutter-Release.xcconfig @@ -0,0 +1 @@ +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Flutter/GeneratedPluginRegistrant.swift b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Flutter/GeneratedPluginRegistrant.swift new file mode 100644 index 0000000000..0d56f519c9 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Flutter/GeneratedPluginRegistrant.swift @@ -0,0 +1,12 @@ +// +// Generated file. Do not edit. +// + +import FlutterMacOS +import Foundation + +import path_provider_macos + +func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner.xcodeproj/project.pbxproj b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..302ba17043 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,572 @@ +// !$*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 /* whatsapp_clone.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "whatsapp_clone.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 /* whatsapp_clone.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 /* whatsapp_clone.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 33CC10E52044A3C60003C045 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 0930; + 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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000000..344b6677d1 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner.xcworkspace/contents.xcworkspacedata b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..1d526a16ed --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/AppDelegate.swift b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/AppDelegate.swift new file mode 100644 index 0000000000..d53ef64377 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/AppDelegate.swift @@ -0,0 +1,9 @@ +import Cocoa +import FlutterMacOS + +@NSApplicationMain +class AppDelegate: FlutterAppDelegate { + override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + return true + } +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..a2ec33f19f --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png new file mode 100644 index 0000000000..3c4935a7ca Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png new file mode 100644 index 0000000000..ed4cc16421 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png new file mode 100644 index 0000000000..483be61389 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png new file mode 100644 index 0000000000..bcbf36df2f Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png new file mode 100644 index 0000000000..9c0a652864 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png new file mode 100644 index 0000000000..e71a726136 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png new file mode 100644 index 0000000000..8a31fe2dd3 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Base.lproj/MainMenu.xib b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Base.lproj/MainMenu.xib new file mode 100644 index 0000000000..537341abf9 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Base.lproj/MainMenu.xib @@ -0,0 +1,339 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Configs/AppInfo.xcconfig b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Configs/AppInfo.xcconfig new file mode 100644 index 0000000000..52898fc7a7 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Configs/AppInfo.xcconfig @@ -0,0 +1,14 @@ +// 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 = whatsapp_clone + +// The application's bundle identifier +PRODUCT_BUNDLE_IDENTIFIER = com.example.whatsappClone + +// The copyright displayed in application information +PRODUCT_COPYRIGHT = Copyright © 2021 com.example. All rights reserved. diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Configs/Debug.xcconfig b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Configs/Debug.xcconfig new file mode 100644 index 0000000000..36b0fd9464 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Configs/Debug.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Debug.xcconfig" +#include "Warnings.xcconfig" diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Configs/Release.xcconfig b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Configs/Release.xcconfig new file mode 100644 index 0000000000..dff4f49561 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Configs/Release.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Release.xcconfig" +#include "Warnings.xcconfig" diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Configs/Warnings.xcconfig b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Configs/Warnings.xcconfig new file mode 100644 index 0000000000..42bcbf4780 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Configs/Warnings.xcconfig @@ -0,0 +1,13 @@ +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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/DebugProfile.entitlements b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/DebugProfile.entitlements new file mode 100644 index 0000000000..dddb8a30c8 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/DebugProfile.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.cs.allow-jit + + com.apple.security.network.server + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Info.plist b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Info.plist new file mode 100644 index 0000000000..4789daa6a4 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Info.plist @@ -0,0 +1,32 @@ + + + + + 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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/MainFlutterWindow.swift b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/MainFlutterWindow.swift new file mode 100644 index 0000000000..2722837ec9 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/MainFlutterWindow.swift @@ -0,0 +1,15 @@ +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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Release.entitlements b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Release.entitlements new file mode 100644 index 0000000000..852fa1a472 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/macos/Runner/Release.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.app-sandbox + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/pubspec.lock b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/pubspec.lock new file mode 100644 index 0000000000..3d17cfe244 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/pubspec.lock @@ -0,0 +1,294 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.8.1" + 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.1.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" + 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.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_lints: + dependency: "direct dev" + description: + name: flutter_lints + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + google_fonts: + dependency: "direct main" + description: + name: google_fonts + 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.3" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.0" + lints: + dependency: transitive + description: + name: lints + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.10" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" + page_transition: + dependency: "direct dev" + description: + name: page_transition + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.4" + 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.4" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + path_provider_macos: + dependency: transitive + description: + name: path_provider_macos + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.2" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.3" + pedantic: + dependency: transitive + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.11.1" + platform: + dependency: transitive + description: + name: platform + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.2" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.2" + process: + dependency: transitive + description: + name: process + url: "https://pub.dartlang.org" + source: hosted + version: "4.2.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.2" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.0" + vector_math: + dependency: transitive + description: + name: vector_math + 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.2.9" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0" +sdks: + dart: ">=2.13.0 <3.0.0" + flutter: ">=2.0.0" diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/pubspec.yaml b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/pubspec.yaml new file mode 100644 index 0000000000..214125ba93 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/pubspec.yaml @@ -0,0 +1,90 @@ +name: whatsapp_clone +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.12.0 <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 +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +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.2 + google_fonts: ^2.1.0 + +dev_dependencies: + flutter_test: + sdk: flutter + + # 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: ^1.0.0 + page_transition: ^2.0.4 + + +# 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/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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/test/widget_test.dart b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/test/widget_test.dart new file mode 100644 index 0000000000..05d325851e --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/test/widget_test.dart @@ -0,0 +1,30 @@ +// 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. + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'package:whatsapp_clone/main.dart'; + +void main() { + testWidgets('Counter increments smoke test', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(const MyApp()); + + // Verify that our counter starts at 0. + expect(find.text('0'), findsOneWidget); + expect(find.text('1'), findsNothing); + + // Tap the '+' icon and trigger a frame. + await tester.tap(find.byIcon(Icons.add)); + await tester.pump(); + + // Verify that our counter has incremented. + expect(find.text('0'), findsNothing); + expect(find.text('1'), findsOneWidget); + }); +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/web/favicon.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/web/favicon.png new file mode 100644 index 0000000000..8aaa46ac1a Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/web/favicon.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/web/icons/Icon-192.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/web/icons/Icon-192.png new file mode 100644 index 0000000000..b749bfef07 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/web/icons/Icon-192.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/web/icons/Icon-512.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/web/icons/Icon-512.png new file mode 100644 index 0000000000..88cfd48dff Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/web/icons/Icon-512.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/web/icons/Icon-maskable-192.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/web/icons/Icon-maskable-192.png new file mode 100644 index 0000000000..eb9b4d76e5 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/web/icons/Icon-maskable-192.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/web/icons/Icon-maskable-512.png b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/web/icons/Icon-maskable-512.png new file mode 100644 index 0000000000..d69c56691f Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/web/icons/Icon-maskable-512.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/web/index.html b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/web/index.html new file mode 100644 index 0000000000..997ec26b14 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/web/index.html @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + whatsapp_clone + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/web/manifest.json b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/web/manifest.json new file mode 100644 index 0000000000..7ab2484ce3 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/web/manifest.json @@ -0,0 +1,35 @@ +{ + "name": "whatsapp_clone", + "short_name": "whatsapp_clone", + "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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/.gitignore b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/.gitignore new file mode 100644 index 0000000000..d492d0d98c --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/.gitignore @@ -0,0 +1,17 @@ +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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/CMakeLists.txt b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/CMakeLists.txt new file mode 100644 index 0000000000..aebdbdca60 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/CMakeLists.txt @@ -0,0 +1,95 @@ +cmake_minimum_required(VERSION 3.15) +project(whatsapp_clone LANGUAGES CXX) + +set(BINARY_NAME "whatsapp_clone") + +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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/flutter/CMakeLists.txt b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/flutter/CMakeLists.txt new file mode 100644 index 0000000000..b02c5485c9 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/flutter/CMakeLists.txt @@ -0,0 +1,103 @@ +cmake_minimum_required(VERSION 3.15) + +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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/flutter/generated_plugin_registrant.cc b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/flutter/generated_plugin_registrant.cc new file mode 100644 index 0000000000..8b6d4680af --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/flutter/generated_plugin_registrant.cc @@ -0,0 +1,11 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#include "generated_plugin_registrant.h" + + +void RegisterPlugins(flutter::PluginRegistry* registry) { +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/flutter/generated_plugin_registrant.h b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/flutter/generated_plugin_registrant.h new file mode 100644 index 0000000000..dc139d85a9 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/flutter/generated_plugin_registrant.h @@ -0,0 +1,15 @@ +// +// 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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/flutter/generated_plugins.cmake b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/flutter/generated_plugins.cmake new file mode 100644 index 0000000000..4d10c25186 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/flutter/generated_plugins.cmake @@ -0,0 +1,15 @@ +# +# 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}/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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/CMakeLists.txt b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/CMakeLists.txt new file mode 100644 index 0000000000..0b899a0bcf --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/CMakeLists.txt @@ -0,0 +1,17 @@ +cmake_minimum_required(VERSION 3.15) +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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/Runner.rc b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/Runner.rc new file mode 100644 index 0000000000..772a6274d0 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/Runner.rc @@ -0,0 +1,121 @@ +// 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", "A new Flutter project." "\0" + VALUE "FileVersion", VERSION_AS_STRING "\0" + VALUE "InternalName", "whatsapp_clone" "\0" + VALUE "LegalCopyright", "Copyright (C) 2021 com.example. All rights reserved." "\0" + VALUE "OriginalFilename", "whatsapp_clone.exe" "\0" + VALUE "ProductName", "whatsapp_clone" "\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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/flutter_window.cpp b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/flutter_window.cpp new file mode 100644 index 0000000000..b43b9095ea --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/flutter_window.cpp @@ -0,0 +1,61 @@ +#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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/flutter_window.h b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/flutter_window.h new file mode 100644 index 0000000000..6da0652f05 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/flutter_window.h @@ -0,0 +1,33 @@ +#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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/main.cpp b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/main.cpp new file mode 100644 index 0000000000..0448610d0a --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/main.cpp @@ -0,0 +1,43 @@ +#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"whatsapp_clone", 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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/resource.h b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/resource.h new file mode 100644 index 0000000000..66a65d1e4a --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/resource.h @@ -0,0 +1,16 @@ +//{{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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/resources/app_icon.ico b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/resources/app_icon.ico new file mode 100644 index 0000000000..c04e20caf6 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/resources/app_icon.ico differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/runner.exe.manifest b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/runner.exe.manifest new file mode 100644 index 0000000000..c977c4a425 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/runner.exe.manifest @@ -0,0 +1,20 @@ + + + + + PerMonitorV2 + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/utils.cpp b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/utils.cpp new file mode 100644 index 0000000000..d19bdbbcc3 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/utils.cpp @@ -0,0 +1,64 @@ +#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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/utils.h b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/utils.h new file mode 100644 index 0000000000..3879d54755 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/utils.h @@ -0,0 +1,19 @@ +#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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/win32_window.cpp b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/win32_window.cpp new file mode 100644 index 0000000000..c10f08dc7d --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/win32_window.cpp @@ -0,0 +1,245 @@ +#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/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/win32_window.h b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/win32_window.h new file mode 100644 index 0000000000..17ba431125 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/03_whatsapp_clone/windows/runner/win32_window.h @@ -0,0 +1,98 @@ +#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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/.gitignore b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/.gitignore new file mode 100644 index 0000000000..ad302c8f81 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/.gitignore @@ -0,0 +1,46 @@ +# 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 \ No newline at end of file diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/.metadata b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/.metadata new file mode 100644 index 0000000000..a5584fc372 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/.metadata @@ -0,0 +1,10 @@ +# 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: 18116933e77adc82f80866c928266a5b4f1ed645 + channel: stable + +project_type: app diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/.vscode/settings.json b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/.vscode/settings.json new file mode 100644 index 0000000000..0db587396d --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "cmake.configureOnOpen": true +} \ No newline at end of file diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/README.md b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/README.md new file mode 100644 index 0000000000..044351d865 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/README.md @@ -0,0 +1,37 @@ +

Photo Booth

+ +## 🎯 About the Project +* Photo Booth is Flutter Application where you can upload your photos/images on to firebase storage with ease. +* It uses Flutter Framework as frontend , backend and Firebase as as server maintaining Databases . + +## ✨ Technologies Used + +

+ + + + + +

+ +## 🚀 Features +✔️ Google Authentication + +✔️ Phone Number Authentication + +✔️ Firebase Storage + +✔️ Firebase Firestore + +✔️ View your photos + +## 🏁 ScreenShots + + + +

+ +                             +                             +           +

diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/analysis_options.yaml b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/analysis_options.yaml new file mode 100644 index 0000000000..61b6c4de17 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/analysis_options.yaml @@ -0,0 +1,29 @@ +# 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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/.gitignore b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/.gitignore new file mode 100644 index 0000000000..6f568019d3 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/.gitignore @@ -0,0 +1,13 @@ +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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/build.gradle b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/build.gradle new file mode 100644 index 0000000000..4efaa2deed --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/build.gradle @@ -0,0 +1,73 @@ +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" +apply plugin: 'com.google.gms.google-services' + +android { + compileSdkVersion 30 + + 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.asmit.cloud_photos" + minSdkVersion 19 + targetSdkVersion 30 + multiDexEnabled true + 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" + implementation platform('com.google.firebase:firebase-bom:29.0.0') + implementation 'com.google.firebase:firebase-analytics-ktx' + implementation 'com.android.support:multidex:1.0.3' +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/google-services.json b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/google-services.json new file mode 100644 index 0000000000..27dce927da --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/google-services.json @@ -0,0 +1,47 @@ +{ + "project_info": { + "project_number": "157699061988", + "project_id": "cloud-photos-dc7cd", + "storage_bucket": "cloud-photos-dc7cd.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:157699061988:android:7408da85dcea42d3cb94f1", + "android_client_info": { + "package_name": "com.asmit.cloud_photos" + } + }, + "oauth_client": [ + { + "client_id": "157699061988-q8oesc67351g7j5r6ed76oevg18jj5p1.apps.googleusercontent.com", + "client_type": 1, + "android_info": { + "package_name": "com.asmit.cloud_photos", + "certificate_hash": "f51b75e1771822b726abb7f91333fa745f0e399c" + } + }, + { + "client_id": "157699061988-vbqbq8ftj07abdsbecl1f8fo1qdu1vib.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyC6-twIkyiKG7nHNfJbkwiCxppcV3NSuYo" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "157699061988-vbqbq8ftj07abdsbecl1f8fo1qdu1vib.apps.googleusercontent.com", + "client_type": 3 + } + ] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/debug/AndroidManifest.xml b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000000..ad4987d959 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/AndroidManifest.xml b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..c2408315f9 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/kotlin/com/asmit/cloud_photos/MainActivity.kt b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/kotlin/com/asmit/cloud_photos/MainActivity.kt new file mode 100644 index 0000000000..5afbe23b73 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/kotlin/com/asmit/cloud_photos/MainActivity.kt @@ -0,0 +1,6 @@ +package com.asmit.cloud_photos + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/res/drawable-v21/launch_background.xml b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000000..f74085f3f6 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/res/drawable/launch_background.xml b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000000..304732f884 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000..db77bb4b7b Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000..17987b79bb Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000000..09d4391482 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000..d5f1c8d34e Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000000..4d6372eebd Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/res/values-night/styles.xml b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000000..449a9f9308 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/res/values/styles.xml b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000000..d74aa35c28 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/profile/AndroidManifest.xml b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000000..ad4987d959 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/build.gradle b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/build.gradle new file mode 100644 index 0000000000..6115f7a68e --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/build.gradle @@ -0,0 +1,30 @@ +buildscript { + ext.kotlin_version = '1.5.30' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:4.1.0' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + classpath 'com.google.gms:google-services:4.3.10' + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" + project.evaluationDependsOn(':app') +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/gradle.properties b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/gradle.properties new file mode 100644 index 0000000000..94adc3a3f9 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx1536M +android.useAndroidX=true +android.enableJetifier=true diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/gradle/wrapper/gradle-wrapper.properties b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000..bc6a58afdd --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/settings.gradle b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/settings.gradle new file mode 100644 index 0000000000..44e62bcf06 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/android/settings.gradle @@ -0,0 +1,11 @@ +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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/images/Screenshot_2021-11-24-09-37-48-64_58b84a04f5e0ef05c042c55f2414b43f.jpg b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/images/Screenshot_2021-11-24-09-37-48-64_58b84a04f5e0ef05c042c55f2414b43f.jpg new file mode 100644 index 0000000000..3de9cc3a70 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/images/Screenshot_2021-11-24-09-37-48-64_58b84a04f5e0ef05c042c55f2414b43f.jpg differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/images/Screenshot_2021-11-24-09-38-47-32_58b84a04f5e0ef05c042c55f2414b43f.jpg b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/images/Screenshot_2021-11-24-09-38-47-32_58b84a04f5e0ef05c042c55f2414b43f.jpg new file mode 100644 index 0000000000..30a89f11e3 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/images/Screenshot_2021-11-24-09-38-47-32_58b84a04f5e0ef05c042c55f2414b43f.jpg differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/images/Screenshot_2021-11-24-17-57-31-53_58b84a04f5e0ef05c042c55f2414b43f.jpg b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/images/Screenshot_2021-11-24-17-57-31-53_58b84a04f5e0ef05c042c55f2414b43f.jpg new file mode 100644 index 0000000000..be4bf395a9 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/images/Screenshot_2021-11-24-17-57-31-53_58b84a04f5e0ef05c042c55f2414b43f.jpg differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/images/Screenshot_2021-11-24-17-58-57-37_58b84a04f5e0ef05c042c55f2414b43f.jpg b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/images/Screenshot_2021-11-24-17-58-57-37_58b84a04f5e0ef05c042c55f2414b43f.jpg new file mode 100644 index 0000000000..84ad5354f6 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/images/Screenshot_2021-11-24-17-58-57-37_58b84a04f5e0ef05c042c55f2414b43f.jpg differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/images/Screenshot_2021-11-24-17-59-22-12_58b84a04f5e0ef05c042c55f2414b43f.jpg b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/images/Screenshot_2021-11-24-17-59-22-12_58b84a04f5e0ef05c042c55f2414b43f.jpg new file mode 100644 index 0000000000..ca60e82509 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/images/Screenshot_2021-11-24-17-59-22-12_58b84a04f5e0ef05c042c55f2414b43f.jpg differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/images/Screenshot_2021-11-24-17-59-40-81_58b84a04f5e0ef05c042c55f2414b43f.jpg b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/images/Screenshot_2021-11-24-17-59-40-81_58b84a04f5e0ef05c042c55f2414b43f.jpg new file mode 100644 index 0000000000..dba046dd66 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/images/Screenshot_2021-11-24-17-59-40-81_58b84a04f5e0ef05c042c55f2414b43f.jpg differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/images/Screenshot_2021-11-24-17-59-48-65_58b84a04f5e0ef05c042c55f2414b43f.jpg b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/images/Screenshot_2021-11-24-17-59-48-65_58b84a04f5e0ef05c042c55f2414b43f.jpg new file mode 100644 index 0000000000..3239288ffc Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/images/Screenshot_2021-11-24-17-59-48-65_58b84a04f5e0ef05c042c55f2414b43f.jpg differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/images/Screenshot_2021-11-24-17-59-52-23_58b84a04f5e0ef05c042c55f2414b43f.jpg b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/images/Screenshot_2021-11-24-17-59-52-23_58b84a04f5e0ef05c042c55f2414b43f.jpg new file mode 100644 index 0000000000..c3ce98daea Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/images/Screenshot_2021-11-24-17-59-52-23_58b84a04f5e0ef05c042c55f2414b43f.jpg differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/.gitignore b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/.gitignore new file mode 100644 index 0000000000..7a7f9873ad --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/.gitignore @@ -0,0 +1,34 @@ +**/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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Flutter/AppFrameworkInfo.plist b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000000..8d4492f977 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + 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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Flutter/Debug.xcconfig b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000000..592ceee85b --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Flutter/Release.xcconfig b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000000..592ceee85b --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner.xcodeproj/project.pbxproj b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..7d12b7054d --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,471 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + 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 = 1020; + 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.asmit.cloudPhotos; + 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_OPTIMIZATION_LEVEL = "-Owholemodule"; + 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.asmit.cloudPhotos; + 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.asmit.cloudPhotos; + 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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..919434a625 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000000..f9b0d7c5ea --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000000..a28140cfdb --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner.xcworkspace/contents.xcworkspacedata b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..1d526a16ed --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000000..f9b0d7c5ea --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/AppDelegate.swift b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000000..70693e4a8c --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..d36b1fab2d --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000000..dc9ada4725 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000000..28c6bf0301 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000000..2ccbfd967d Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000000..f091b6b0bc Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000000..4cde12118d Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000000..d0ef06e7ed Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000000..dcdc2306c2 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000000..2ccbfd967d Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000000..c8f9ed8f5c Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000000..a6d6b8609d Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000000..a6d6b8609d Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000000..75b2d164a5 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000000..c4df70d39d Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000000..6a84f41e14 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000000..d0e1f58536 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000000..0bedcf2fd4 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000000..9da19eacad Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000000..9da19eacad Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000000..9da19eacad Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000000..89c2725b70 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# 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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Base.lproj/LaunchScreen.storyboard b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000000..f2e259c7c9 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Base.lproj/Main.storyboard b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000000..f3c28516fb --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Info.plist b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Info.plist new file mode 100644 index 0000000000..4f24d01eed --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + cloud_photos + 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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Runner-Bridging-Header.h b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000000..308a2a560b --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/lib/AuthPages/login.dart b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/lib/AuthPages/login.dart new file mode 100644 index 0000000000..22969b9d74 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/lib/AuthPages/login.dart @@ -0,0 +1,232 @@ +import 'package:cloud_photos/Screen/home_screen.dart'; +import 'package:cloud_photos/widgets/colors.dart'; +import 'package:cloud_photos/widgets/text.dart'; +import 'package:firebase_auth/firebase_auth.dart'; +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; +import '../Authentication/auth.dart'; +import 'otp.dart'; + +class LoginPage extends StatefulWidget { + const LoginPage({Key? key}) : super(key: key); + + @override + _LoginPageState createState() => _LoginPageState(); +} + +class _LoginPageState extends State { + final _phonecontroller = TextEditingController(); + + Future checkuserlog() async { + final FirebaseAuth auth = FirebaseAuth.instance; + final user = auth.currentUser; + if (user != null) { + name = user.displayName.toString(); + email = user.email.toString(); + imgurl = user.photoURL.toString(); + WidgetsBinding.instance!.addPostFrameCallback((_) { + Navigator.pushReplacement( + context, + MaterialPageRoute( + builder: (context) => const HomeScreen(), + ), + ); + }); + } + } + + signInMethod() async { + await signin(); + Navigator.pushReplacement( + context, + MaterialPageRoute( + builder: (context) => const HomeScreen(), + ), + ); + } + + @override + void initState() { + super.initState(); + checkuserlog(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + body: SafeArea( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Padding( + padding: const EdgeInsets.only( + top: 20.0, + ), + child: Row( + children: [ + IconButton( + onPressed: () {}, + icon: const Icon( + Icons.arrow_back_ios_new_outlined, + color: Colors.black, + size: 20, + ), + ), + ], + ), + ), + Padding( + padding: const EdgeInsets.only(left: 20, top: 20.0), + child: Row( + children: [ + Helper.text("Welcome to Photo Booth", 20, 0, primaryColor, + FontWeight.bold) + ], + ), + ), + Padding( + padding: const EdgeInsets.only(top: 10.0, left: 20, bottom: 20), + child: Row( + children: [ + Helper.text("Enjoy by saving your memories", 18, 0, + primaryColor, FontWeight.normal) + ], + ), + ), + Form( + child: Column( + children: [ + Padding( + padding: const EdgeInsets.only( + left: 20.0, + right: 20, + ), + child: Container( + height: 60, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: boxColor, + ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: TextFormField( + keyboardType: TextInputType.phone, + controller: _phonecontroller, + decoration: InputDecoration( + focusedBorder: const UnderlineInputBorder( + borderSide: + BorderSide(color: Colors.transparent)), + enabledBorder: const UnderlineInputBorder( + borderSide: + BorderSide(color: Colors.transparent)), + hintText: "Phone Number", + hintStyle: GoogleFonts.ubuntu( + color: Colors.grey, + fontWeight: FontWeight.normal, + fontSize: 13), + errorStyle: const TextStyle( + color: Colors.redAccent, fontSize: 15), + ), + validator: (value) { + if (value!.length < 10) { + return 'Please valid Phone Number'; + } + return null; + }, + ), + ), + ), + ), + Padding( + padding: + const EdgeInsets.only(left: 20.0, right: 20, top: 20), + child: GestureDetector( + onTap: () { + _phonecontroller.text.isEmpty + ? showAlertDialog(context) + : Navigator.of(context).push( + MaterialPageRoute( + builder: (context) => OTPScreen( + phone: _phonecontroller.text, + ), + ), + ); + }, + child: Container( + decoration: BoxDecoration( + color: appColor, + borderRadius: BorderRadius.circular(10)), + height: 60, + child: Center( + child: Helper.text("Send OTP", 20, 0, secondaryColor, + FontWeight.bold)), + ), + ), + ), + ], + )), + const Spacer(), + Row(children: [ + const Expanded( + child: Divider( + height: 2, + )), + const SizedBox( + width: 1, + ), + Helper.text( + "or login with", 20, 0, primaryColor, FontWeight.bold), + const SizedBox( + width: 1, + ), + const Expanded( + child: Divider( + height: 2, + )), + ]), + const SizedBox( + height: 10, + ), + GestureDetector( + onTap: () { + signInMethod(); + }, + child: SizedBox( + height: 20, + width: 30, + child: Image.network( + 'https://cdn-icons-png.flaticon.com/128/2991/2991148.png'), + ), + ), + const SizedBox( + height: 20, + ), + ], + ), + ), + ); + } + + showAlertDialog(BuildContext context) { + Widget cancelButton = TextButton( + child: Helper.text('Cancel', 20, 0, appColor, FontWeight.bold), + onPressed: () { + Navigator.pop(context); + }, + ); + + AlertDialog alert = AlertDialog( + content: Helper.text( + 'Please enter your phone number', 18, 0, appColor, FontWeight.bold), + actions: [ + cancelButton, + ], + ); + showDialog( + context: context, + builder: (BuildContext context) { + return alert; + }, + ); + } +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/lib/AuthPages/otp.dart b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/lib/AuthPages/otp.dart new file mode 100644 index 0000000000..7c18daaf71 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/lib/AuthPages/otp.dart @@ -0,0 +1,131 @@ +import 'package:cloud_photos/Screen/home_screen.dart'; +import 'package:cloud_photos/widgets/colors.dart'; +import 'package:cloud_photos/widgets/text.dart'; +import 'package:firebase_auth/firebase_auth.dart'; +import 'package:flutter/material.dart'; +import 'package:pinput/pin_put/pin_put.dart'; + +class OTPScreen extends StatefulWidget { + final String phone; + const OTPScreen({Key? key, required this.phone}) : super(key: key); + + @override + _OTPScreenState createState() => _OTPScreenState(); +} + +class _OTPScreenState extends State { + late String _verificationCode; + + final GlobalKey _scaffoldkey = GlobalKey(); + final TextEditingController _pinPutController = TextEditingController(); + final FocusNode _pinPutFocusNode = FocusNode(); + final BoxDecoration pinPutDecoration = BoxDecoration( + color: const Color.fromRGBO(43, 46, 66, 1), + borderRadius: BorderRadius.circular(10.0), + border: Border.all( + color: const Color.fromRGBO(126, 203, 224, 1), + ), + ); + + void _verifyPhone() async { + await FirebaseAuth.instance.verifyPhoneNumber( + phoneNumber: '+91 ${widget.phone}', + verificationCompleted: (PhoneAuthCredential credential) async { + await FirebaseAuth.instance + .signInWithCredential(credential) + .then((value) async { + if (value.user != null) { + Navigator.of(context).pop( + MaterialPageRoute( + builder: (context) => const HomeScreen(), + ), + ); + } + }); + }, + verificationFailed: (FirebaseAuthException e) { + print(e.message); + }, + codeSent: (String verificationID, int? resendToken) { + setState( + () { + _verificationCode = verificationID; + }, + ); + }, + codeAutoRetrievalTimeout: (String verificationID) { + setState(() { + _verificationCode = verificationID; + }); + }, + timeout: const Duration(seconds: 60), + ); + } + + @override + void initState() { + super.initState(); + _verifyPhone(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + body: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + margin: const EdgeInsets.only(top: 40), + child: Center( + child: Helper.text('Verify +91-${widget.phone}', 20, 0, appColor, + FontWeight.bold), + ), + ), + Padding( + padding: const EdgeInsets.all(30.0), + child: PinPut( + fieldsCount: 6, + textStyle: const TextStyle(fontSize: 25.0, color: Colors.white), + eachFieldWidth: 40.0, + eachFieldHeight: 55.0, + focusNode: _pinPutFocusNode, + controller: _pinPutController, + submittedFieldDecoration: pinPutDecoration, + selectedFieldDecoration: pinPutDecoration, + followingFieldDecoration: pinPutDecoration, + pinAnimationType: PinAnimationType.fade, + onSubmit: (pin) async { + try { + await FirebaseAuth.instance + .signInWithCredential(PhoneAuthProvider.credential( + verificationId: _verificationCode, smsCode: pin)) + .then( + (value) async { + if (value.user != null) { + Navigator.pushReplacement( + context, + MaterialPageRoute( + builder: (context) => const HomeScreen(), + ), + ); + } + }, + ); + } catch (e) { + FocusScope.of(context).unfocus(); + _scaffoldkey.currentState! + // ignore: deprecated_member_use + .showSnackBar( + const SnackBar( + content: Text('Invalid OTP'), + ), + ); + } + }, + ), + ) + ], + ), + ); + } +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/lib/Authentication/auth.dart b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/lib/Authentication/auth.dart new file mode 100644 index 0000000000..6712881421 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/lib/Authentication/auth.dart @@ -0,0 +1,39 @@ +import 'package:firebase_auth/firebase_auth.dart'; +import 'package:flutter/foundation.dart'; +import 'package:google_sign_in/google_sign_in.dart'; +// import 'package:many_apps/Firebase/localdb.dart'; + +final FirebaseAuth _auth = FirebaseAuth.instance; +final GoogleSignIn googleSignIn = GoogleSignIn(); + +String name = ""; +String email = ""; +String imgurl = ""; +//Sign In function +Future signin() async { + try { + final GoogleSignInAccount? googleSignInAccount = + await googleSignIn.signIn(); + final GoogleSignInAuthentication googleSignInAuthentication = + await googleSignInAccount!.authentication; + final AuthCredential credential = GoogleAuthProvider.credential( + idToken: googleSignInAuthentication.idToken, + accessToken: googleSignInAuthentication.accessToken, + ); + final userCredential = await _auth.signInWithCredential(credential); + final User? user = userCredential.user; + assert(await user!.getIdToken() != null); + + final User? currentuser = _auth.currentUser; + assert(currentuser!.uid == user!.uid); + return user; + } catch (e) { + debugPrint(e.toString()); + } +} + +Future signout() async { + await googleSignIn.signOut(); + await _auth.signOut(); + return "done"; +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/lib/Screen/home_screen.dart b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/lib/Screen/home_screen.dart new file mode 100644 index 0000000000..08c443a5e7 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/lib/Screen/home_screen.dart @@ -0,0 +1,381 @@ +// ignore_for_file: prefer_const_constructors + +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:cloud_firestore/cloud_firestore.dart'; +import 'package:cloud_photos/Screen/viewImage.dart'; +import 'dart:io'; +import 'package:firebase_auth/firebase_auth.dart'; +import 'package:firebase_storage/firebase_storage.dart' as firebase_storage; +import 'package:flutter/material.dart'; +import 'package:cloud_photos/AuthPages/login.dart'; +import 'package:cloud_photos/Authentication/auth.dart'; +import 'package:cloud_photos/widgets/colors.dart'; +import 'package:cloud_photos/widgets/text.dart'; +import 'package:flutter_advanced_drawer/flutter_advanced_drawer.dart'; +import 'package:image_picker/image_picker.dart'; + +class HomeScreen extends StatefulWidget { + const HomeScreen({Key? key}) : super(key: key); + + @override + _HomeScreenState createState() => _HomeScreenState(); +} + +firebase_storage.FirebaseStorage storage = + firebase_storage.FirebaseStorage.instance; +var images = []; + +class _HomeScreenState extends State { + void getImage() async { + var val = await FirebaseFirestore.instance + .collection('photos') + .doc(FirebaseAuth.instance.currentUser!.uid) + .get(); + setState(() { + images = val.data()!['images']; + }); + debugPrint(images.toString()); + } + + @override + void initState() { + getImage(); + super.initState(); + } + + signoutmethod(context) async { + await signout(); + WidgetsBinding.instance!.addPostFrameCallback( + (_) { + Navigator.pushReplacement( + context, + MaterialPageRoute( + builder: (context) => const LoginPage(), + ), + ); + }, + ); + } + + @override + Widget build(BuildContext context) { + final _advancedDrawerController = AdvancedDrawerController(); + return AdvancedDrawer( + drawer: Drawer( + child: Container( + color: appColor, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + children: [ + Helper.text( + "Dashboard", 20, 0, secondaryColor, FontWeight.bold), + ], + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + children: [ + Builder(builder: (context) { + return GestureDetector( + onTap: () async { + await signoutmethod(context); + showsnackbar(context); + }, + child: Helper.text( + "Logout", 20, 0, Colors.grey, FontWeight.bold)); + }), + ], + ), + ), + ], + ), + ), + ), + backdropColor: appColor, + controller: _advancedDrawerController, + animationCurve: Curves.easeInOut, + animationDuration: const Duration(milliseconds: 300), + animateChildDecoration: true, + rtlOpening: false, + disabledGestures: false, + childDecoration: const BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(16))), + child: Scaffold( + resizeToAvoidBottomInset: false, + floatingActionButton: FloatingActionButton( + onPressed: () { + showModalBottomSheet( + context: context, + isDismissible: true, + builder: (context) { + return BottomSheet(fetchImages: getImage); + }, + ); + }, + backgroundColor: appColor, + child: Icon( + Icons.cloud_upload, + size: 30, + color: secondaryColor, + ), + ), + backgroundColor: secondaryColor, + body: SafeArea( + child: Column( + children: [ + Padding( + padding: const EdgeInsets.all(15.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Helper.text( + "Welcome ${FirebaseAuth.instance.currentUser!.displayName} !", + 20, + 0, + appColor, + FontWeight.bold), + ], + ), + ), + Expanded( + child: GestureDetector( + onLongPress: () { + showAlertDialog(context); + }, + child: GridView.builder( + itemCount: images.length, + gridDelegate: + const SliverGridDelegateWithMaxCrossAxisExtent( + maxCrossAxisExtent: 100, + ), + itemBuilder: (BuildContext context, int index) { + return Hero( + tag: images[index], + child: GestureDetector( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (b) => ViewImage( + image: images[index]['url']))); + }, + child: Container( + margin: EdgeInsets.all(2), + height: 200, + width: 400, + child: ClipRRect( + borderRadius: BorderRadius.circular(10), + child: CachedNetworkImage( + fit: BoxFit.cover, + imageUrl: images[index]['url']), + ), + ), + ), + ); + }, + ), + ), + ) + ], + ), + ), + ), + ); + } + + showAlertDialog(BuildContext context) { + Widget cancelButton = TextButton( + style: ButtonStyle(backgroundColor: MaterialStateProperty.all(appColor)), + child: Helper.text('Cancel', 20, 0, secondaryColor, FontWeight.bold), + onPressed: () { + Navigator.pop(context); + }, + ); + Widget continueButton = TextButton( + child: Helper.text('Delete', 20, 0, appColor, FontWeight.bold), + onPressed: () { + Navigator.pop(context); + }, + ); + AlertDialog alert = AlertDialog( + content: Helper.text('Would you like to delete the image?', 18, 0, + appColor, FontWeight.bold), + actions: [ + cancelButton, + continueButton, + ], + ); + showDialog( + context: context, + builder: (BuildContext context) { + return alert; + }, + ); + } + + showsnackbar(BuildContext context) { + final snackbar = SnackBar( + content: Text("Logged Out"), + behavior: SnackBarBehavior.floating, + duration: Duration(seconds: 2), + ); + ScaffoldMessenger.of(context).showSnackBar(snackbar); + } +} + +class BottomSheet extends StatefulWidget { + final Function fetchImages; + const BottomSheet({Key? key, required this.fetchImages}) : super(key: key); + + @override + _BottomSheetState createState() => _BottomSheetState(); +} + +class _BottomSheetState extends State { + var imageUrl = 'str'; + late File img; + late String time; + bool flag = true; + bool uploaded = false; + Future uploading() async { + firebase_storage.Reference ref = storage + .ref() + .child('photos') + .child(FirebaseAuth.instance.currentUser!.uid); + + var imgPath = DateTime.now().millisecondsSinceEpoch.toString() + ".png"; + ref = ref.child(imgPath); + firebase_storage.UploadTask uploadedImg = ref.putFile(img); + await uploadedImg.whenComplete(() => null); + + await ref.getDownloadURL().then((value) { + imageUrl = value; + time = DateTime.now().millisecondsSinceEpoch.toString(); + }); + FirebaseFirestore.instance + .collection("photos") + .doc(FirebaseAuth.instance.currentUser!.uid) + .set( + { + "images": FieldValue.arrayUnion( + [ + {"url": imageUrl, "time": DateTime.now()} + ], + ), + }, + SetOptions(merge: true), + ); + + setState(() { + flag = false; + }); + widget.fetchImages(); + } + + getImage(bool val) async { + ImagePicker _picker = ImagePicker(); + final XFile? image = await _picker.pickImage( + source: val ? ImageSource.gallery : ImageSource.camera); + if (image != null) { + setState(() { + img = File(image.path); + }); + await uploading(); + } + } + + @override + Widget build(BuildContext context) { + return Container( + decoration: const BoxDecoration( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(40), + topRight: Radius.circular(40), + ), + ), + height: 200, + child: Column( + children: [ + const SizedBox( + height: 30, + ), + Container( + child: Helper.text( + "Choose a picture to Upload", 20, 0, appColor, FontWeight.bold), + ), + const SizedBox( + height: 40, + ), + !uploaded + ? Padding( + padding: const EdgeInsets.all(0.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + GestureDetector( + onTap: () async { + setState(() { + uploaded = true; + }); + debugPrint(uploaded.toString()); + await getImage(true); + Navigator.pop(context); + // uploading(); + }, + child: Row( + children: [ + Icon( + Icons.image, + size: 25, + color: appColor, + ), + SizedBox( + width: 10, + ), + Helper.text( + "Gallery", 20, 0, appColor, FontWeight.bold), + ], + ), + ), + const SizedBox( + width: 10, + ), + GestureDetector( + onTap: () { + Navigator.pop(context); + getImage(false); + uploading(); + if (uploaded == false) { + const CircularProgressIndicator(); + } + }, + child: Row( + children: [ + Icon( + Icons.camera, + color: appColor, + size: 25, + ), + const SizedBox( + width: 10, + ), + Helper.text( + "Camera", 20, 0, appColor, FontWeight.bold), + ], + ), + ) + ]), + ) + : const Center( + child: CircularProgressIndicator(), + ), + ], + ), + ); + } +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/lib/Screen/viewImage.dart b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/lib/Screen/viewImage.dart new file mode 100644 index 0000000000..70f467095e --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/lib/Screen/viewImage.dart @@ -0,0 +1,36 @@ +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter/material.dart'; + +class ViewImage extends StatefulWidget { + final String image; + const ViewImage({Key? key, required this.image}) : super(key: key); + + @override + _ViewImageState createState() => _ViewImageState(); +} + +class _ViewImageState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + body: Hero( + transitionOnUserGestures: true, + tag: widget.image, + child: GestureDetector( + onTap: () { + Navigator.pop(context); + }, + child: Center( + child: Container( + width: MediaQuery.of(context).size.width, + child: Image.network( + widget.image, + fit: BoxFit.cover, + ), + ), + ), + ), + ), + ); + } +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/lib/main.dart b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/lib/main.dart new file mode 100644 index 0000000000..0f10867b4b --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/lib/main.dart @@ -0,0 +1,56 @@ +import 'dart:async'; +import 'package:cloud_photos/widgets/colors.dart'; +import 'package:cloud_photos/widgets/text.dart'; +import 'package:flutter/material.dart'; +import 'package:firebase_core/firebase_core.dart'; +import 'AuthPages/login.dart'; + +Future main() async { + WidgetsFlutterBinding.ensureInitialized(); + await Firebase.initializeApp(); + runApp(const MyApp()); +} + +class MyApp extends StatelessWidget { + const MyApp({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return const MaterialApp( + debugShowCheckedModeBanner: false, + title: "Cloud Photos", + home: SplashScreen(), + ); + } +} + +class SplashScreen extends StatefulWidget { + const SplashScreen({Key? key}) : super(key: key); + + @override + _SplashScreenState createState() => _SplashScreenState(); +} + +class _SplashScreenState extends State { + @override + void initState() { + Timer( + const Duration(seconds: 3), + () => Navigator.pushReplacement( + context, MaterialPageRoute(builder: (b) => const LoginPage()))); + super.initState(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: appColor, + body: Center( + child: Container( + child: Helper.text( + 'Photo Booth', 30, 0, secondaryColor, FontWeight.bold), + ), + ), + ); + } +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/lib/widgets/colors.dart b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/lib/widgets/colors.dart new file mode 100644 index 0000000000..1ab9ea8b97 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/lib/widgets/colors.dart @@ -0,0 +1,5 @@ +import 'package:flutter/material.dart'; +final Color appColor = Color.fromRGBO(48, 54, 72, 1); +final Color boxColor = Colors.grey[200]!; +final Color primaryColor = Colors.black; +final Color secondaryColor = Colors.white; diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/lib/widgets/text.dart b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/lib/widgets/text.dart new file mode 100644 index 0000000000..7978b71f39 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/lib/widgets/text.dart @@ -0,0 +1,17 @@ +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; + +class Helper { + static Widget text( + String msg, int size, int spacing, Color color, FontWeight fontWeight) { + return Text( + msg, + textAlign: TextAlign.center, + style: GoogleFonts.nunito( + fontWeight: fontWeight, + fontSize: size.toDouble(), + color: color, + letterSpacing: spacing.toDouble()), + ); + } +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/linux/.gitignore b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/linux/.gitignore new file mode 100644 index 0000000000..d3896c9844 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/linux/.gitignore @@ -0,0 +1 @@ +flutter/ephemeral diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/linux/CMakeLists.txt b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/linux/CMakeLists.txt new file mode 100644 index 0000000000..12b26055fa --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/linux/CMakeLists.txt @@ -0,0 +1,116 @@ +cmake_minimum_required(VERSION 3.10) +project(runner LANGUAGES CXX) + +set(BINARY_NAME "cloud_photos") +set(APPLICATION_ID "com.asmit.cloud_photos") + +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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/linux/flutter/CMakeLists.txt b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/linux/flutter/CMakeLists.txt new file mode 100644 index 0000000000..33fd5801e7 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/linux/flutter/CMakeLists.txt @@ -0,0 +1,87 @@ +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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/linux/flutter/generated_plugin_registrant.cc b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/linux/flutter/generated_plugin_registrant.cc new file mode 100644 index 0000000000..e71a16d23d --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/linux/flutter/generated_plugin_registrant.cc @@ -0,0 +1,11 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#include "generated_plugin_registrant.h" + + +void fl_register_plugins(FlPluginRegistry* registry) { +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/linux/flutter/generated_plugin_registrant.h b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/linux/flutter/generated_plugin_registrant.h new file mode 100644 index 0000000000..e0f0a47bc0 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/linux/flutter/generated_plugin_registrant.h @@ -0,0 +1,15 @@ +// +// 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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/linux/flutter/generated_plugins.cmake b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/linux/flutter/generated_plugins.cmake new file mode 100644 index 0000000000..51436ae8c9 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/linux/flutter/generated_plugins.cmake @@ -0,0 +1,15 @@ +# +# 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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/linux/main.cc b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/linux/main.cc new file mode 100644 index 0000000000..e7c5c54370 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/linux/main.cc @@ -0,0 +1,6 @@ +#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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/linux/my_application.cc b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/linux/my_application.cc new file mode 100644 index 0000000000..432f362f8d --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/linux/my_application.cc @@ -0,0 +1,104 @@ +#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, "cloud_photos"); + 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, "cloud_photos"); + } + + 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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/linux/my_application.h b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/linux/my_application.h new file mode 100644 index 0000000000..72271d5e41 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/linux/my_application.h @@ -0,0 +1,18 @@ +#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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/.gitignore b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/.gitignore new file mode 100644 index 0000000000..746adbb6b9 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/.gitignore @@ -0,0 +1,7 @@ +# Flutter-related +**/Flutter/ephemeral/ +**/Pods/ + +# Xcode-related +**/dgph +**/xcuserdata/ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Flutter/Flutter-Debug.xcconfig b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Flutter/Flutter-Debug.xcconfig new file mode 100644 index 0000000000..c2efd0b608 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Flutter/Flutter-Debug.xcconfig @@ -0,0 +1 @@ +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Flutter/Flutter-Release.xcconfig b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Flutter/Flutter-Release.xcconfig new file mode 100644 index 0000000000..c2efd0b608 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Flutter/Flutter-Release.xcconfig @@ -0,0 +1 @@ +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Flutter/GeneratedPluginRegistrant.swift b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Flutter/GeneratedPluginRegistrant.swift new file mode 100644 index 0000000000..796787f52f --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Flutter/GeneratedPluginRegistrant.swift @@ -0,0 +1,22 @@ +// +// Generated file. Do not edit. +// + +import FlutterMacOS +import Foundation + +import cloud_firestore +import firebase_auth +import firebase_core +import firebase_storage +import path_provider_macos +import sqflite + +func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + FLTFirebaseFirestorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseFirestorePlugin")) + FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin")) + FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) + FLTFirebaseStoragePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseStoragePlugin")) + PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) + SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner.xcodeproj/project.pbxproj b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..d193bf97bd --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,572 @@ +// !$*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 /* cloud_photos.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "cloud_photos.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 /* cloud_photos.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 /* cloud_photos.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 33CC10E52044A3C60003C045 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 0930; + 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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000000..fbed1de71c --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner.xcworkspace/contents.xcworkspacedata b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..1d526a16ed --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/AppDelegate.swift b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/AppDelegate.swift new file mode 100644 index 0000000000..d53ef64377 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/AppDelegate.swift @@ -0,0 +1,9 @@ +import Cocoa +import FlutterMacOS + +@NSApplicationMain +class AppDelegate: FlutterAppDelegate { + override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + return true + } +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..a2ec33f19f --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png new file mode 100644 index 0000000000..3c4935a7ca Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png new file mode 100644 index 0000000000..ed4cc16421 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png new file mode 100644 index 0000000000..483be61389 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png new file mode 100644 index 0000000000..bcbf36df2f Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png new file mode 100644 index 0000000000..9c0a652864 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png new file mode 100644 index 0000000000..e71a726136 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png new file mode 100644 index 0000000000..8a31fe2dd3 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Base.lproj/MainMenu.xib b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Base.lproj/MainMenu.xib new file mode 100644 index 0000000000..537341abf9 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Base.lproj/MainMenu.xib @@ -0,0 +1,339 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Configs/AppInfo.xcconfig b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Configs/AppInfo.xcconfig new file mode 100644 index 0000000000..206af85a49 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Configs/AppInfo.xcconfig @@ -0,0 +1,14 @@ +// 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 = cloud_photos + +// The application's bundle identifier +PRODUCT_BUNDLE_IDENTIFIER = com.asmit.cloudPhotos + +// The copyright displayed in application information +PRODUCT_COPYRIGHT = Copyright © 2021 com.asmit. All rights reserved. diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Configs/Debug.xcconfig b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Configs/Debug.xcconfig new file mode 100644 index 0000000000..36b0fd9464 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Configs/Debug.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Debug.xcconfig" +#include "Warnings.xcconfig" diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Configs/Release.xcconfig b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Configs/Release.xcconfig new file mode 100644 index 0000000000..dff4f49561 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Configs/Release.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Release.xcconfig" +#include "Warnings.xcconfig" diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Configs/Warnings.xcconfig b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Configs/Warnings.xcconfig new file mode 100644 index 0000000000..42bcbf4780 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Configs/Warnings.xcconfig @@ -0,0 +1,13 @@ +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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/DebugProfile.entitlements b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/DebugProfile.entitlements new file mode 100644 index 0000000000..dddb8a30c8 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/DebugProfile.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.cs.allow-jit + + com.apple.security.network.server + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Info.plist b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Info.plist new file mode 100644 index 0000000000..4789daa6a4 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Info.plist @@ -0,0 +1,32 @@ + + + + + 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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/MainFlutterWindow.swift b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/MainFlutterWindow.swift new file mode 100644 index 0000000000..2722837ec9 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/MainFlutterWindow.swift @@ -0,0 +1,15 @@ +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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Release.entitlements b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Release.entitlements new file mode 100644 index 0000000000..852fa1a472 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/macos/Runner/Release.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.app-sandbox + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/pubspec.lock b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/pubspec.lock new file mode 100644 index 0000000000..7d7fa986f1 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/pubspec.lock @@ -0,0 +1,572 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.8.1" + 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.1.0+1" + 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.1.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.0" + cloud_firestore_platform_interface: + dependency: transitive + description: + name: cloud_firestore_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "5.4.5" + cloud_firestore_web: + dependency: transitive + description: + name: cloud_firestore_web + url: "https://pub.dartlang.org" + source: hosted + version: "2.5.0" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.15.0" + cross_file: + dependency: transitive + description: + name: cross_file + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.2" + 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" + 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.2.0" + firebase_auth_platform_interface: + dependency: transitive + description: + name: firebase_auth_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "6.1.4" + firebase_auth_web: + dependency: transitive + description: + name: firebase_auth_web + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.0" + firebase_core: + dependency: "direct main" + description: + name: firebase_core + url: "https://pub.dartlang.org" + source: hosted + version: "1.10.0" + firebase_core_platform_interface: + dependency: transitive + description: + name: firebase_core_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "4.1.0" + firebase_core_web: + dependency: transitive + description: + name: firebase_core_web + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" + firebase_storage: + dependency: "direct main" + description: + name: firebase_storage + url: "https://pub.dartlang.org" + source: hosted + version: "10.1.0" + firebase_storage_platform_interface: + dependency: transitive + description: + name: firebase_storage_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.6" + firebase_storage_web: + dependency: transitive + description: + name: firebase_storage_web + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_advanced_drawer: + dependency: "direct main" + description: + name: flutter_advanced_drawer + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.4" + flutter_blurhash: + dependency: transitive + description: + name: flutter_blurhash + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.0" + flutter_cache_manager: + dependency: transitive + description: + name: flutter_cache_manager + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.3" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.4" + flutter_signin_button: + dependency: "direct main" + description: + name: flutter_signin_button + url: "https://pub.dartlang.org" + source: hosted + version: "2.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" + font_awesome_flutter: + dependency: transitive + description: + name: font_awesome_flutter + url: "https://pub.dartlang.org" + source: hosted + version: "9.2.0" + google_fonts: + dependency: "direct main" + description: + name: google_fonts + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + google_sign_in: + dependency: "direct main" + description: + name: google_sign_in + url: "https://pub.dartlang.org" + source: hosted + version: "5.2.1" + google_sign_in_platform_interface: + dependency: transitive + description: + name: google_sign_in_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + google_sign_in_web: + dependency: transitive + description: + name: google_sign_in_web + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.0+3" + 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_picker: + dependency: "direct main" + description: + name: image_picker + url: "https://pub.dartlang.org" + source: hosted + version: "0.8.4+4" + image_picker_for_web: + dependency: transitive + description: + name: image_picker_for_web + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.4" + image_picker_platform_interface: + dependency: transitive + description: + name: image_picker_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.4.1" + 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" + lints: + dependency: transitive + description: + name: lints + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.10" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" + octo_image: + dependency: transitive + description: + name: octo_image + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.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.7" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.7" + 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.2" + path_provider_macos: + dependency: transitive + description: + name: path_provider_macos + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.3" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.4" + pedantic: + dependency: transitive + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.11.1" + pinput: + dependency: "direct main" + description: + name: pinput + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.2" + platform: + dependency: transitive + description: + name: platform + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.2" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.2" + process: + dependency: transitive + description: + name: process + url: "https://pub.dartlang.org" + source: hosted + version: "4.2.4" + quiver: + dependency: transitive + description: + name: quiver + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1+1" + 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: transitive + description: + name: sqflite + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0+4" + sqflite_common: + dependency: transitive + description: + name: sqflite_common + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1+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.2" + 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.0" + win32: + dependency: transitive + description: + name: win32 + url: "https://pub.dartlang.org" + source: hosted + version: "2.3.0" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0" +sdks: + dart: ">=2.14.0 <3.0.0" + flutter: ">=2.5.0" diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/pubspec.yaml b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/pubspec.yaml new file mode 100644 index 0000000000..e41cb620b4 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/pubspec.yaml @@ -0,0 +1,84 @@ +name: cloud_photos +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.12.0 <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 +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + cached_network_image: ^3.1.0+1 + cloud_firestore: ^3.1.0 + cupertino_icons: ^1.0.2 + firebase_auth: ^3.1.1 + firebase_core: ^1.6.0 + firebase_storage: ^10.1.0 + flutter: + sdk: flutter + flutter_advanced_drawer: ^1.2.4 + flutter_signin_button: ^2.0.0 + google_fonts: ^2.1.0 + google_sign_in: ^5.1.0 + image_picker: ^0.8.4+4 + pinput: ^1.2.2 + +dev_dependencies: + flutter_lints: ^1.0.0 + 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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/test/widget_test.dart b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/test/widget_test.dart new file mode 100644 index 0000000000..2544a1f127 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/test/widget_test.dart @@ -0,0 +1,30 @@ +// 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. + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'package:cloud_photos/main.dart'; + +void main() { + testWidgets('Counter increments smoke test', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(const MyApp()); + + // Verify that our counter starts at 0. + expect(find.text('0'), findsOneWidget); + expect(find.text('1'), findsNothing); + + // Tap the '+' icon and trigger a frame. + await tester.tap(find.byIcon(Icons.add)); + await tester.pump(); + + // Verify that our counter has incremented. + expect(find.text('0'), findsNothing); + expect(find.text('1'), findsOneWidget); + }); +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/web/favicon.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/web/favicon.png new file mode 100644 index 0000000000..8aaa46ac1a Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/web/favicon.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/web/icons/Icon-192.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/web/icons/Icon-192.png new file mode 100644 index 0000000000..b749bfef07 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/web/icons/Icon-192.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/web/icons/Icon-512.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/web/icons/Icon-512.png new file mode 100644 index 0000000000..88cfd48dff Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/web/icons/Icon-512.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/web/icons/Icon-maskable-192.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/web/icons/Icon-maskable-192.png new file mode 100644 index 0000000000..eb9b4d76e5 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/web/icons/Icon-maskable-192.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/web/icons/Icon-maskable-512.png b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/web/icons/Icon-maskable-512.png new file mode 100644 index 0000000000..d69c56691f Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/web/icons/Icon-maskable-512.png differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/web/index.html b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/web/index.html new file mode 100644 index 0000000000..e2930f6c56 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/web/index.html @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + cloud_photos + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/web/manifest.json b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/web/manifest.json new file mode 100644 index 0000000000..c932b972ae --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/web/manifest.json @@ -0,0 +1,35 @@ +{ + "name": "cloud_photos", + "short_name": "cloud_photos", + "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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/.gitignore b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/.gitignore new file mode 100644 index 0000000000..d492d0d98c --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/.gitignore @@ -0,0 +1,17 @@ +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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/CMakeLists.txt b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/CMakeLists.txt new file mode 100644 index 0000000000..95a4a4ac67 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/CMakeLists.txt @@ -0,0 +1,95 @@ +cmake_minimum_required(VERSION 3.15) +project(cloud_photos LANGUAGES CXX) + +set(BINARY_NAME "cloud_photos") + +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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/flutter/CMakeLists.txt b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/flutter/CMakeLists.txt new file mode 100644 index 0000000000..b02c5485c9 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/flutter/CMakeLists.txt @@ -0,0 +1,103 @@ +cmake_minimum_required(VERSION 3.15) + +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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/flutter/generated_plugin_registrant.cc b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/flutter/generated_plugin_registrant.cc new file mode 100644 index 0000000000..8b6d4680af --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/flutter/generated_plugin_registrant.cc @@ -0,0 +1,11 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#include "generated_plugin_registrant.h" + + +void RegisterPlugins(flutter::PluginRegistry* registry) { +} diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/flutter/generated_plugin_registrant.h b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/flutter/generated_plugin_registrant.h new file mode 100644 index 0000000000..dc139d85a9 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/flutter/generated_plugin_registrant.h @@ -0,0 +1,15 @@ +// +// 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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/flutter/generated_plugins.cmake b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/flutter/generated_plugins.cmake new file mode 100644 index 0000000000..4d10c25186 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/flutter/generated_plugins.cmake @@ -0,0 +1,15 @@ +# +# 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}/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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/CMakeLists.txt b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/CMakeLists.txt new file mode 100644 index 0000000000..0b899a0bcf --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/CMakeLists.txt @@ -0,0 +1,17 @@ +cmake_minimum_required(VERSION 3.15) +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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/Runner.rc b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/Runner.rc new file mode 100644 index 0000000000..f0ef57cb5e --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/Runner.rc @@ -0,0 +1,121 @@ +// 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.asmit" "\0" + VALUE "FileDescription", "A new Flutter project." "\0" + VALUE "FileVersion", VERSION_AS_STRING "\0" + VALUE "InternalName", "cloud_photos" "\0" + VALUE "LegalCopyright", "Copyright (C) 2021 com.asmit. All rights reserved." "\0" + VALUE "OriginalFilename", "cloud_photos.exe" "\0" + VALUE "ProductName", "cloud_photos" "\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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/flutter_window.cpp b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/flutter_window.cpp new file mode 100644 index 0000000000..b43b9095ea --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/flutter_window.cpp @@ -0,0 +1,61 @@ +#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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/flutter_window.h b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/flutter_window.h new file mode 100644 index 0000000000..6da0652f05 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/flutter_window.h @@ -0,0 +1,33 @@ +#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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/main.cpp b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/main.cpp new file mode 100644 index 0000000000..a625916746 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/main.cpp @@ -0,0 +1,43 @@ +#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"cloud_photos", 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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/resource.h b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/resource.h new file mode 100644 index 0000000000..66a65d1e4a --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/resource.h @@ -0,0 +1,16 @@ +//{{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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/resources/app_icon.ico b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/resources/app_icon.ico new file mode 100644 index 0000000000..c04e20caf6 Binary files /dev/null and b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/resources/app_icon.ico differ diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/runner.exe.manifest b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/runner.exe.manifest new file mode 100644 index 0000000000..c977c4a425 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/runner.exe.manifest @@ -0,0 +1,20 @@ + + + + + PerMonitorV2 + + + + + + + + + + + + + + + diff --git a/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/utils.cpp b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/utils.cpp new file mode 100644 index 0000000000..d19bdbbcc3 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/utils.cpp @@ -0,0 +1,64 @@ +#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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/utils.h b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/utils.h new file mode 100644 index 0000000000..3879d54755 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/utils.h @@ -0,0 +1,19 @@ +#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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/win32_window.cpp b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/win32_window.cpp new file mode 100644 index 0000000000..c10f08dc7d --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/win32_window.cpp @@ -0,0 +1,245 @@ +#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/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/win32_window.h b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/win32_window.h new file mode 100644 index 0000000000..17ba431125 --- /dev/null +++ b/Android_Development_With_Flutter/11_Flutter_projects/04_photo_booth/windows/runner/win32_window.h @@ -0,0 +1,98 @@ +#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/Android_Development_With_Flutter/readme.md b/Android_Development_With_Flutter/readme.md new file mode 100644 index 0000000000..9e4bd33fbb --- /dev/null +++ b/Android_Development_With_Flutter/readme.md @@ -0,0 +1,18 @@ + +| Index | Topics | +| :----:|:-------------| +| 1 | DART:
• [Introduction To Dart](https://github.com/girlscript/winter-of-contributing/blob/Android_Development_With_Flutter/Android_Development_With_Flutter/01_Introduction_To_Dart/dart.md)
• [Excercise On Dart](https://github.com/girlscript/winter-of-contributing/blob/Android_Development_With_Flutter/Android_Development_With_Flutter/01_Introduction_To_Dart/exercises.md)
• [Null Safety Of Dart](https://github.com/girlscript/winter-of-contributing/blob/Android_Development_With_Flutter/Android_Development_With_Flutter/01_Introduction_To_Dart/null_safety.md) | +| 2 | [Why to use Flutter??](https://github.com/girlscript/winter-of-contributing/tree/Android_Development_With_Flutter/Android_Development_With_Flutter/03_Why_To_Use_Flutter) | +| 3 | Installation Of Flutter:
•[Android Studio](https://github.com/girlscript/winter-of-contributing/tree/Android_Development_With_Flutter/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio)
•[Android Studio(video)](https://github.com/girlscript/winter-of-contributing/blob/Android_Development_With_Flutter/Android_Development_With_Flutter/04_Flutter_Installation/01_Setup_Flutter_with_Android_Studio_Video/Flutter-Installation%20and%20setup%20Android%20Studio.md)
•[VS Code(video)](https://github.com/girlscript/winter-of-contributing/blob/Android_Development_With_Flutter/Android_Development_With_Flutter/04_Flutter_Installation/02_Setup_Flutter_with_VS_Code_Video/Setup_Flutter_%26_VS_Code.md) | +| 4 | Flutter:
•[Introduction To Flutter](https://github.com/girlscript/winter-of-contributing/blob/Android_Development_With_Flutter/Android_Development_With_Flutter/02_Introduction_To_Flutter/flutter.md)
•[Introduction To Flutter(Video)](https://github.com/girlscript/winter-of-contributing/tree/Android_Development_With_Flutter/Android_Development_With_Flutter/02_Introduction_To_Flutter_Video)
•[Material Components](https://github.com/girlscript/winter-of-contributing/blob/Android_Development_With_Flutter/Android_Development_With_Flutter/02_Introduction_To_Flutter/Material_components.md)
•[List and Grid View](https://github.com/girlscript/winter-of-contributing/blob/Android_Development_With_Flutter/Android_Development_With_Flutter/02_Introduction_To_Flutter/list_and_grid_view.md)
•[Deeplinking](https://github.com/girlscript/winter-of-contributing/blob/Android_Development_With_Flutter/Android_Development_With_Flutter/02_Introduction_To_Flutter/Deeplinking.md) | +| 5 | Widgets:
•[Intro to Widgets(part-1)](https://github.com/girlscript/winter-of-contributing/blob/Android_Development_With_Flutter/Android_Development_With_Flutter/05_Flutter_Widgets/01_Introduction_To_Widgets/flutter_Widgets.md)
•[Intro to Widgets(Video)](https://github.com/girlscript/winter-of-contributing/tree/Android_Development_With_Flutter/Android_Development_With_Flutter/05_Flutter_Widgets/01_Introduction_To_Widgets%20_Video)
•[Intro to Widgets (part-2)](https://github.com/girlscript/winter-of-contributing/tree/Android_Development_With_Flutter/Android_Development_With_Flutter/05_Flutter_Widgets/02_Introduction_To_Widgets_Part-2)
•[Row and Column widget](https://github.com/girlscript/winter-of-contributing/blob/Android_Development_With_Flutter/Android_Development_With_Flutter/05_Flutter_Widgets/03_Rows_And_Columns_In_Flutter/readme.md)
•[Text Widget](https://github.com/girlscript/winter-of-contributing/blob/Android_Development_With_Flutter/Android_Development_With_Flutter/05_Flutter_Widgets/04_Introduction_To_Text_widget/text_widget.md)
•[AppBar Widget](https://github.com/girlscript/winter-of-contributing/blob/Android_Development_With_Flutter/Android_Development_With_Flutter/05_Flutter_Widgets/05_Appbar_In_Flutter/Appbar_widget.md) | +| 6 | Animations:
•[Intro to Animations(part-1)](https://github.com/girlscript/winter-of-contributing/blob/Android_Development_With_Flutter/Android_Development_With_Flutter/06_Animation_In_Flutter/01_Introduction_To_Animation_In_Flutter/Animation-Documentation.md)
•[Intro to Animations(part-2)](https://github.com/girlscript/winter-of-contributing/blob/Android_Development_With_Flutter/Android_Development_With_Flutter/06_Animation_In_Flutter/02_Introduction_To_Flutter_Animation_Part-2/Flutter%20animation.md)
•[Animations(Video)](https://github.com/girlscript/winter-of-contributing/blob/Android_Development_With_Flutter/Android_Development_With_Flutter/06_Animation_In_Flutter/03_Introduction_To_Animation_Video/Animation-Video.md) | +| 7 | [Shared Preference](https://github.com/girlscript/winter-of-contributing/blob/Android_Development_With_Flutter/Android_Development_With_Flutter/07_Plugins_In_Flutter/01_Shared_Preference/01_SharedPreferences.md) | +| 8 | Assets In Flutter:
[Assets](https://github.com/girlscript/winter-of-contributing/blob/Android_Development_With_Flutter/Android_Development_With_Flutter/08_Assets_In_Flutter/01_Assets_In_Flutter/asset.md)
[Assets(Video)](https://github.com/girlscript/winter-of-contributing/blob/Android_Development_With_Flutter/Android_Development_With_Flutter/08_Assets_In_Flutter/02_Flutter_Dealing_with_Assets_Video/README.md) | +| 9 | Navigation:
•[Simple Navigation](https://github.com/girlscript/winter-of-contributing/blob/Android_Development_With_Flutter/Android_Development_With_Flutter/09_Flutter_Navigation/01_Navigation_in_Flutter.md)
•[MultiScreen Navigation(Project)](https://github.com/girlscript/winter-of-contributing/tree/Android_Development_With_Flutter/Android_Development_With_Flutter/09_Flutter_Navigation/multi_screen_navigation) | +| 10 | Firebase:
•[Connect to firebase](https://github.com/girlscript/winter-of-contributing/blob/Android_Development_With_Flutter/Android_Development_With_Flutter/10_Firebase_With_Flutter/Connect%20app.md)
•[Authentication](https://github.com/girlscript/winter-of-contributing/blob/Android_Development_With_Flutter/Android_Development_With_Flutter/10_Firebase_With_Flutter/authentication.md)
•[Auth Project](https://github.com/girlscript/winter-of-contributing/tree/Android_Development_With_Flutter/Android_Development_With_Flutter/10_Firebase_With_Flutter/google_auth) | +| 11 | Projects:
•[Bulb App](https://github.com/girlscript/winter-of-contributing/tree/Android_Development_With_Flutter/Android_Development_With_Flutter/Flutter_project/01_bulb_app)
•[Dice App](https://github.com/girlscript/winter-of-contributing/tree/Android_Development_With_Flutter/Android_Development_With_Flutter/Flutter_project/02_dice_app)
•[WhatsApp Clone](https://github.com/girlscript/winter-of-contributing/tree/Android_Development_With_Flutter/Android_Development_With_Flutter/Flutter_project/03_whatsapp_clone)
•[Cloud Photos](https://github.com/girlscript/winter-of-contributing/tree/Android_Development_With_Flutter/Android_Development_With_Flutter/Flutter_project/cloud_photos) | + + + +