repo_id
stringlengths 21
168
| file_path
stringlengths 36
210
| content
stringlengths 1
9.98M
| __index_level_0__
int64 0
0
|
---|---|---|---|
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-1/Question_5.dart | /*---------------SMIT FLUTTER ----------------*/
void main() {
//Write a program to read temperature in centigrade and display a suitable message according to temperature:
//You have num variable temperature = 42;
//Now print the message according to temperature:
//temp < 0 then Freezing weather
//temp 0-10 then Very Cold weather
//temp 10-20 then Cold weather
//temp 20-30 then Normal in Temp
//temp 30-40 then Its Hot
//temp >=40 then Its Very Hot?
int temperature = 42;
if (temperature < 0) {
print("Freezing weather");
} else if (temperature >= 0 && temperature <= 10) {
print("Very Cold weather");
} else if (temperature > 10 && temperature <= 20) {
print("Cold weather");
} else if (temperature > 20 && temperature <= 30) {
print("Normal in Temp");
} else if (temperature > 30 && temperature <= 40) {
print("It's Hot");
} else if (temperature >= 40) {
print("It's Very Hot");
}
}
| 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-1/Question11.dart | /*---------------SMIT FLUTTER ----------------*/
import 'dart:io';
import 'dart:math';
void main() {
//Write a program to calculate root of any number.i.e: √y = y½?
print('Enter a number:');
double number = double.parse(stdin.readLineSync()!);
double squareRoot = sqrt(number);
print('The square root of $number is $squareRoot');
}
| 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-1/Question_9.dart | /*---------------SMIT FLUTTER ----------------*/
void main() {
// Check if the number is even or odd, If number is even then check if this is divisible by 5
//or not & if number is odd then check if this is divisible by 7 or not?
int number = 7;
if (number % 2 == 0) {
print('$number is even.');
if (number % 5 == 0) {
print('$number is divisible by 5.');
} else {
print('$number is not divisible by 5.');
}
} else {
print('$number is odd.');
if (number % 7 == 0) {
print('$number is divisible by 7.');
} else {
print('$number is not divisible by 7.');
}
}
}
| 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-1/Question_6.dart | /*---------------SMIT FLUTTER ----------------*/
void main() {
//Write a program to check whether an alphabet is a vowel or consonant?
String variable = 'b'; // here you check any variable
if (variable == 'a' ||
variable == 'e' ||
variable == 'i' ||
variable == 'o' ||
variable == 'u') {
print('$variable is a vowel.');
} else {
print('$variable is a consonant.');
}
}
| 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-1/Question_10.dart | /*---------------SMIT FLUTTER ----------------*/
import 'dart:io';
void main() {
//Write a program that takes three numbers from the user and prints the greatest number
//& lowest number?
// Input three numbers from the user
print('Enter the first number:');
double number1 = double.parse(stdin.readLineSync()!);
print('Enter the second number:');
double number2 = double.parse(stdin.readLineSync()!);
print('Enter the third number:');
double number3 = double.parse(stdin.readLineSync()!);
// Find the greatest number
double greatestNumber = number1;
if (number2 > greatestNumber) {
greatestNumber = number2;
}
if (number3 > greatestNumber) {
greatestNumber = number3;
}
// Find the lowest number
double lowestNumber = number1;
if (number2 < lowestNumber) {
lowestNumber = number2;
}
if (number3 < lowestNumber) {
lowestNumber = number3;
}
// Print the greatest and lowest numbers
print('The greatest number is: $greatestNumber');
print('The lowest number is: $lowestNumber');
}
| 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-1/Question_12.dart | /*---------------SMIT FLUTTER ----------------*/
import 'dart:io';
void main() {
/*Write a program to convert Celsius to Fahrenheit i.e:
Temperature in degrees Fahrenheit (°F) = (Temperature in degrees Celsius (°C) * 9/5) + 32?*/
print('Enter temperature in Celsius:');
double celsius = double.parse(stdin.readLineSync()!);
double fahrenheit = (celsius * 9 / 5) + 32;
print('$celsius°C is equal to $fahrenheit°F');
}
| 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assignment-3/question16.dart | /*
16. Write a program that asks the user for their email and password. If the
email and password match a predefined set of credentials, print "User
login successful." Otherwise, keep asking for the email and password
until the correct credentials are provided.
*/
import 'dart:io';
void main() {
String email = "[email protected]";
String password = "12345";
bool login = false;
String a = "Enter your Email: ";
String b = "Enter your Password: ";
while (!login) {
print(a);
String userEmail = stdin.readLineSync()!;
print(b);
String userPassword = stdin.readLineSync()!;
if ((userEmail == email) && (userPassword == password)) {
login = true;
print("Login successfuly");
} else {
print("invalid request");
}
}
}
| 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assignment-3/question11.dart | /*------------ SMIT -------------*/
/*
11. Write a program to display a pattern like a right angle triangle with a
number using loop.
The pattern like :
1
12
123
1234
*/
void main() {
int rows = 4; // Number of rows in the pattern
for (int i = 1; i <= rows; i++) {
String pattern = ""; // Pattern for the current row
for (int j = 1; j <= i; j++) {
pattern += j.toString(); // Add the current number to the pattern
}
print(pattern); // Print the pattern for the current row
}
}
| 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assignment-3/question7.dart | /*------------ SMIT -------------*/
/*
7. Write a program that prints the multiplication table of a given number
using a for loop.
Example:
Input: 5
Output:
5 x 1 = 5
5 x 2 = 10
5 x 3 = 15
...
5 x 10 = 50
*/
void main() {
int number = 5;
for (var i = 1; i <= 10; i++) {
print("$number x $i = ${number * i}");
}
}
| 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assignment-3/question19.dart | /*------------ SMIT -------------*/
/*
19. Write a program that counts the number of vowels in a given string
using a for loop and if-else condition.
*/
import 'dart:io';
void main() {
String inputStr = promptuser("Enter String Please!: ");
int count = 0;
for (var i = 0; i < inputStr.length; i++) {
String updateStr = inputStr[i].toLowerCase();
if (updateStr == 'a' ||
updateStr == 'e' ||
updateStr == 'i' ||
updateStr == 'o' ||
updateStr == 'u') {
count++;
}
}
print("Number of vowels in given String are $count");
}
String promptuser(String prompt) {
stdout.write("$prompt ");
return stdin.readLineSync()!;
}
| 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assignment-3/question5.dart | /*------------ SMIT -------------*/
/*
5. Write a program that calculates the sum of all the digits in a given
number using a while loop.
Example:
Input: 12345
Output: Sum of digits: 15
*/
void main() {
int number = 12345; // The number to calculate the sum of its digits
int sum = 0; // Initialize sum to 0
while (number > 0) {
int digit = number % 10; // Extract the last digit
sum += digit; // Add the digit to the sum
number ~/= 10; // Remove the last digit from the number
}
print('Sum of digits: $sum');
}
| 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assignment-3/question12.dart | /*------------ SMIT -------------*/
/*
13. Write a program to make such a pattern like a right angle triangle with
a number which will repeat a number in a row.
The pattern like :
1
22
333
4444
*/
void main() {
int rows = 4;
for (int i = 1; i <= rows; i++) {
String row = '';
for (int j = 0; j < i; j++) {
row += i.toString();
}
print(row);
}
}
| 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assignment-3/question24.dart | /*------------ SMIT -------------*/
/*
24. Write a program that takes a list of integers as input and returns a new
list containing only the prime numbers from the original list. Implement
the solution using a for loop and logical operations.
Input: [4, 7, 10, 13, 16, 19, 22, 25, 28, 31]
Output: [7, 13, 19, 31]
*/
void main() {
List<int> numbers = [4, 7, 10, 13, 16, 19, 22, 25, 28, 31];
List<int> primes = [];
for (int number in numbers) {
if (isPrime(number)) {
primes.add(number);
}
}
print("Prime numbers: $primes");
}
bool isPrime(int number) {
if (number <= 1) {
return false;
}
for (int i = 2; i <= number / 2; i++) {
if (number % i == 0) {
return false;
}
}
return true;
}
| 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assignment-3/question2.dart | /*------------ SMIT -------------*/
/*
2. Write a program that prints the Fibonacci sequence up to a given
number using a for loop.
Example:
Input: 10
Output: 0 1 1 2 3 5 8
*/
void main() {
int n = 10; // The number of Fibonacci sequence elements to print
int a = 0; // First Fibonacci number
int b = 1; // Second Fibonacci number
print(a); // Print the first Fibonacci number
print(b); // Print the second Fibonacci number
for (int i = 2; i < 7; i++) {
// Starting from i = 2 since the first two Fibonacci numbers are already printed
int c = a + b;
// Calculate the next Fibonacci number by adding the previous two numbers
print(c); // Print the next Fibonacci number
a = b; // Update a with the value of b for the next iteration
b = c; // Update b with the value of c for the next iteration
}
}
| 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assignment-3/question6.dart | /*------------ SMIT -------------*/
/*
6. Implement a code that finds the largest element in a list using a for
loop.
Example:
Input: [3, 9, 1, 6, 4, 2, 8, 5, 7]
Output: Largest element: 9
*/
void main() {
List<int> numbers = [3, 9, 1, 6, 4, 2, 8, 5, 7];
int largest = numbers[0];
for (var i = 1; i < numbers.length; i++) {
if (numbers[i] > largest) {
largest = numbers[i];
}
}
print("Largest element:$largest");
}
| 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assignment-3/question17.dart | /*------------ SMIT -------------*/
/*
17. Write a program that asks the user for their email and password. You
are given a list of predefined user credentials (email and password
combinations). If the entered email and password match any of the
credentials in the list, print "User login successful." Otherwise, keep
asking for the email and password until the correct credentials are
provided.
*/
import 'dart:io';
void main() {
List<Map<String, String>> userCredentials = [
{"email": "[email protected]", "password": "1234"},
{"email": "[email protected]", "password": "1112"},
{"email": "[email protected]", "password": "2232"},
// Add more user if you want
];
bool login = false;
while (!login) {
String enteredEmail = promptUser("Enter your email:");
String enteredPassword = promptUser("Enter your password:");
if (userCredentials.any((credentials) =>
credentials["email"] == enteredEmail &&
credentials["password"] == enteredPassword)) {
login = true;
print("User login successful.");
break;
} else {
print("Incorrect email or password. Please try again.");
}
}
}
String promptUser(String prompt) {
stdout.write("$prompt ");
return stdin.readLineSync()!;
}
| 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assignment-3/question21.dart | /*------------ SMIT -------------*/
/*
21. Write a program that calculates the sum of the squares of all odd
numbers in a given list using a for loop and if-else condition.
*/
void main() {
List<int> numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9];
int sumOfSquares = 0;
for (int number in numbers) {
if (number % 2 != 0) {
sumOfSquares += (number * number);
}
}
print("Sum of squares of odd numbers: $sumOfSquares");
}
| 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assignment-3/question4.dart | /*------------ SMIT -------------*/
/*
4. Implement a code that finds the factorial of a number using a while
loop or for loop.
Example:
Input: 5
Output: Factorial of 5 is 120
*/
void main() {
int number = 5;
int factorial = 1;
for (int i = 1; i <= number; i++) {
factorial *= i;
}
print("Factorial of $number is $factorial");
}
| 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assignment-3/question13.dart | /*------------ SMIT -------------*/
/*
14. Write a program to make such a pattern like a right angle triangle with
the number increased by 1 using loop..
The pattern like :
1
2 3
4 5 6
7 8 9 10
*/
void main() {
int rows = 4;
int count = 1;
for (int i = 1; i <= rows; i++) {
String row = '';
for (int j = 0; j < i; j++) {
row += count.toString();
count++;
}
print(row);
}
}
| 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assignment-3/question14.dart | /*------------ SMIT -------------*/
/*
14. Write a program to make a pyramid pattern with numbers increased by 1
output:
1
2 3
4 5 6
7 8 9 10
*/
void main() {
int rows = 4;
int num = 1;
for (int i = 1; i <= rows; i++) {
String row = '';
for (int j = 1; j <= rows - i; j++) {
row += ' ';
}
for (int k = 1; k <= i; k++) {
row += '$num ';
num++;
}
print(row);
}
}
| 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assignment-3/question18.dart | /*------------ SMIT -------------*/
/*
18. Write a program that takes a list of numbers as input and prints the
numbers greater than 5 using a for loop and if-else condition.
*/
import 'dart:io';
void main() {
List<int> numbers = [];
String str = "Enter numbers";
print(str);
int listsize = int.parse(stdin.readLineSync()!);
for (var i = 0; i <= listsize; i++) {
int number = int.parse(promptUser("Enter number ${i + 1}:"));
numbers.add(number);
}
print("here are the numbers which is greater then 5");
for (int number in numbers) {
if (number > 5) {
print(number);
}
}
}
String promptUser(String prompt) {
stdout.write("$prompt ");
return stdin.readLineSync()!;
}
| 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assignment-3/question3.dart | /*------------ SMIT -------------*/
/*
3. Implement a code that checks whether a given number is prime or not.
Example:
Input: 17
Output: 17 is a prime number.
*/
void main() {
int number = 19;
if ((number % 2) == 0 && (number == 1)) {
print("$number is not a Prime Number");
} else {
print("$number is a Prime Number");
}
}
| 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assignment-3/question20.dart | /*------------ SMIT -------------*/
/*
20. Implement a code that finds the maximum and minimum elements in a
list using a for loop and if-else condition.
*/
void main() {
List<int> numbers = [5, 3, 9, 1, 7, 2];
int max = numbers[0];
int min = numbers[0];
for (int i = 1; i < numbers.length; i++) {
if (numbers[i] > max) {
max = numbers[i];
}
if (numbers[i] < min) {
min = numbers[i];
}
}
print("Maximum element: $max");
print("Minimum element: $min");
}
| 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assignment-3/question22.dart | /*------------ SMIT -------------*/
/*
22: Write a program that takes a list of student details as input, where
each student is represented by a map containing their name, marks,
section, and roll number. The program should determine the grade of
each student based on their average score (assuming maximum marks
for each subject is 100) and print the student's name along with their
grade.
List<Map<String, dynamic>> studentDetails = [
{'name': 'John', 'marks': [80, 75, 90], 'section': 'A', 'rollNumber': 101},
{'name': 'Emma', 'marks': [95, 92, 88], 'section': 'B', 'rollNumber': 102},
{'name': 'Ryan', 'marks': [70, 65, 75], 'section': 'A', 'rollNumber': 103},
];
*/
void main() {
List<Map<String, dynamic>> studentDetails = [
{
'name': 'Aamir',
'marks': [80, 75, 90],
'section': 'A',
'rollNumber': 101
},
{
'name': 'Naveed',
'marks': [95, 92, 88],
'section': 'B',
'rollNumber': 102
},
{
'name': 'Zain',
'marks': [70, 65, 75],
'section': 'A',
'rollNumber': 103
},
];
for (Map<String, dynamic> student in studentDetails) {
String name = student['name'];
List<int> marks = student['marks'];
double average = calculateAverage(marks);
String grade = calculateGrade(average);
print('Name: $name, Grade: $grade');
}
}
double calculateAverage(List<int> marks) {
int sum = marks.reduce((a, b) => a + b);
return sum / marks.length;
}
String calculateGrade(double average) {
if (average >= 90) {
return 'A';
} else if (average >= 80) {
return 'B';
} else if (average >= 70) {
return 'C';
} else if (average >= 60) {
return 'D';
} else {
return 'F';
}
}
| 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assignment-3/Question-1.dart | /*------------ SMIT -------------*/
/*
1. Write a program that takes a list of numbers as input and prints the
even numbers in the list using a for loop.
Example:
Input: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
Output: 2 4 6 8 10
*/
void main() {
List<int> numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
List<int> evenNumbers = []; // List to store the even numbers
for (int i = 0; i < numbers.length; i++) {
int number = numbers[i]; // Get the current number from the list
if (number % 2 == 0) {
// Check if the number is even
evenNumbers.add(number); // Add the even number to the evenNumbers list
}
}
print(evenNumbers); // Print the list of even numbers
}
| 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assignment-3/question9.dart | /*------------ SMIT -------------*/
/*
9. Write a program to display the cube of the number up to an integer.
Test Data :
Input number of terms : 5
Expected Output :
Number is : 1 and cube of the 1 is :1
Number is : 2 and cube of the 2 is :8
Number is : 3 and cube of the 3 is :27
Number is : 4 and cube of the 4 is :64
Number is : 5 and cube of the 5 is :125
*/
void main() {
int number = 5;
int cubRoot;
for (var i = 1; i <= number; i++) {
cubRoot = i * i * i;
print("Number is : $i and cube of the $i is :$cubRoot");
}
}
| 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assignment-3/question10.dart | /*------------ SMIT -------------*/
/*
10. Write a program to display a pattern like a right angle triangle using an
asterisk using loop.
The pattern like :
*
**
*
**
*/
void main() {
for (var i = 1; i <= 4; i++) {
if (i % 2 == 0) {
print("**");
} else {
print("*");
}
}
}
| 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assignment-3/question23.dart | /*------------ SMIT -------------*/
/*
23. Implement a code that finds the average of all the negative numbers in
a list using a for loop and if-else condition.
*/
void main() {
List<int> numbers = [-5, 3, -9, 1, -7, 2];
int sum = 0;
int count = 0;
for (int number in numbers) {
if (number < 0) {
sum += number;
count++;
}
}
double average = count > 0 ? sum / count : 0;
print("Average of negative numbers: $average");
}
| 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assignment-3/question8.dart | /*------------ SMIT -------------*/
/*
8. Implement a function that checks if a given string is a palindrome.
Example:
input "radar"
output:"radar" is palindrome
*/
void main() {
String str = "radar"; // Palindrome string
if (Palindrome(str)) {
print("$str is palindrome ");
} else {
print("$str is not palindrome ");
}
}
bool Palindrome(String str) {
String reversedStr = str.split('').reversed.join('');
return str == reversedStr;
}
| 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assignment-3/question15.dart | /*------------ SMIT -------------*/
/*
15. Write a program to make such a pattern as a pyramid with an asterisk.
*
* *
* * *
* * * *
*/
void main() {
int rows = 4;
for (int i = 1; i <= rows; i++) {
String row = '';
for (int j = 1; j <= rows - i; j++) {
row += ' ';
}
for (int k = 1; k <= i; k++) {
row += '* ';
}
print(row);
}
}
| 0 |
mirrored_repositories/dompet-app/dompet | mirrored_repositories/dompet-app/dompet/lib/main.dart | import 'package:dompet/pages/home/splash_screen.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Flutter Demo',
theme: ThemeData(),
home: const SplashScreen(),
);
}
}
| 0 |
mirrored_repositories/dompet-app/dompet/lib/pages | mirrored_repositories/dompet-app/dompet/lib/pages/home/home_screen.dart | import 'package:dompet/models/model.dart';
import 'package:dompet/pages/home/widgets/card_info.dart';
import 'package:dompet/pages/home/widgets/card_overview.dart';
import 'package:dompet/pages/home/widgets/card_spendings.dart';
import 'package:dompet/pages/home/widgets/custom_drawer.dart';
import 'package:dompet/pages/home/widgets/insight.dart';
import 'package:dompet/pages/home/widgets/invoice_card.dart';
import 'package:dompet/pages/home/widgets/previeous_transaction_card.dart';
import 'package:dompet/pages/home/widgets/quick_transfer.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import '/../constant/constant.dart';
import 'widgets/notification.dart';
class HomeScreen extends StatefulWidget {
const HomeScreen({super.key});
@override
State<HomeScreen> createState() => _HomeScreenState();
}
class _HomeScreenState extends State<HomeScreen> {
final List<double> insightData = [0.4, 0.7, 0.5, 0.9, 0.4];
final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();
List<String> svg = [
"assets/svg/burger-menu.svg",
"assets/svg/right-arrow.svg",
];
@override
Widget build(BuildContext context) {
return Scaffold(
key: _scaffoldKey,
drawer: Container(
margin: const EdgeInsets.only(top: 100, bottom: 20),
width: MediaQuery.of(context).size.width * 0.7,
decoration: const BoxDecoration(
borderRadius: BorderRadius.only(
topRight: Radius.circular(50),
bottomRight: Radius.circular(50),
),
),
child: const CustomDrawer(),
),
appBar: AppBar(
backgroundColor: Colors.transparent,
elevation: 0,
leading: IconButton(
icon: SvgPicture.asset(
svg[0],
width: 100,
),
onPressed: () {
if (_scaffoldKey.currentState!.isDrawerOpen) {
_scaffoldKey.currentState!.openEndDrawer();
} else {
_scaffoldKey.currentState!.openDrawer();
}
},
),
title: Row(
children: [
SvgPicture.asset(
"assets/svg/wallet-money.svg",
color: color3,
width: 50,
),
],
),
actions: [
Stack(
children: [
// icon
Container(
margin: const EdgeInsets.only(top: 15, right: 10),
child: Row(
children: [
SvgPicture.asset(
"assets/svg/gift.svg",
width: 30,
color: Colors.black54,
),
const SizedBox(width: 10),
SvgPicture.asset(
"assets/svg/bell.svg",
width: 30,
color: Colors.black54,
),
const SizedBox(width: 10),
SvgPicture.asset(
"assets/svg/message.svg",
width: 30,
color: Colors.black54,
),
const SizedBox(width: 10),
],
),
),
// notif
const Positioned(
left: 15,
bottom: 25,
child: DotNotification(countNotif: '3'),
),
const Positioned(
left: 55,
bottom: 25,
child: DotNotification(countNotif: '4'),
),
const Positioned(
right: 10,
bottom: 25,
child: DotNotification(countNotif: '5'),
),
],
)
],
),
body: SingleChildScrollView(
child: Column(
children: [
BuildInvoiceCard(
context: context,
color: color1,
icon: demoData[0].icon,
title: demoData[0].title,
description: demoData[0].description),
BuildInvoiceCard(
context: context,
color: color2,
icon: demoData[1].icon,
title: demoData[1].title,
description: demoData[1].description),
BuildInvoiceCard(
context: context,
color: color3,
icon: demoData[2].icon,
title: demoData[2].title,
description: demoData[2].description),
BuildInvoiceCard(
context: context,
color: color4,
icon: demoData[3].icon,
title: demoData[3].title,
description: demoData[3].description),
// content 2
const BuildCardOverview(),
Container(
padding: const EdgeInsets.all(15),
margin: const EdgeInsets.symmetric(horizontal: 20),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.2), // Shadow color
spreadRadius: 5, // Spread radius
blurRadius: 7, // Blur radius
offset:
const Offset(0, 3), // Offset in the x and y direction
),
],
),
child: Column(
children: [
const SizedBox(height: 15),
Row(
children: [
const Column(
children: [
Row(
children: [
Text(
"Activity",
style: TextStyle(fontSize: 25),
),
],
)
],
),
const Spacer(),
Column(
children: [
Row(
children: [
const Text(
"Income",
style: TextStyle(fontSize: 18),
),
const SizedBox(width: 10),
_buildDot(Colors.green)
],
)
],
),
const SizedBox(width: 10),
],
),
const SizedBox(height: 10),
Row(
children: [
const Column(
children: [
Row(
children: [
Text(
"\$2030.203",
style: TextStyle(fontSize: 25),
),
],
)
],
),
const Spacer(),
Column(
children: [
Row(
children: [
const Text(
"Outcome",
style: TextStyle(fontSize: 18),
),
const SizedBox(width: 10),
_buildDot(Colors.redAccent)
],
)
],
),
const SizedBox(width: 10),
],
),
Container(
margin: const EdgeInsets.only(top: 25),
child: Row(
children: [
Column(
children: [
_buildCountInsight('80'),
_buildCountInsight('60'),
_buildCountInsight('40'),
_buildCountInsight('30'),
_buildCountInsight('0'),
],
),
const Spacer(),
Column(
children: [
InsightGraph(
dataPoints: insightData,
)
],
),
],
),
),
Padding(
padding: const EdgeInsets.only(left: 20),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
_buildCountInsight('Text'),
_buildCountInsight('Text'),
_buildCountInsight('Text'),
_buildCountInsight('Text'),
],
),
)
],
),
),
const BuildQuicTransfer(),
const SizedBox(height: 20),
const BuildSpendingsCard(),
const SizedBox(height: 30),
const PrevieousTransaction(),
const SizedBox(height: 30),
const CardInfo(),
const SizedBox(height: 30),
],
),
),
floatingActionButton: FloatingActionButton(
backgroundColor: color2,
child: const Icon(Icons.calendar_today_outlined),
onPressed: () {}),
);
}
Widget _buildCountInsight(String text) {
return Padding(
padding: const EdgeInsets.only(bottom: 30),
child: Text(text),
);
}
Container _buildDot(Color color) {
return Container(
height: 20,
width: 20,
decoration: BoxDecoration(
color: color,
borderRadius: BorderRadius.circular(20),
),
);
}
}
| 0 |
mirrored_repositories/dompet-app/dompet/lib/pages | mirrored_repositories/dompet-app/dompet/lib/pages/home/splash_screen.dart | import 'dart:async';
import 'package:dompet/constant/constant.dart';
import 'package:dompet/pages/home/home_screen.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
class SplashScreen extends StatefulWidget {
const SplashScreen({super.key});
@override
_SplashScreenState createState() => _SplashScreenState();
}
class _SplashScreenState extends State<SplashScreen> {
@override
void initState() {
super.initState();
Timer(
const Duration(seconds: 5),
() => Navigator.of(context).pushReplacement(
MaterialPageRoute(
builder: (BuildContext context) => const HomeScreen(),
),
),
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
body: Container(
height: MediaQuery.of(context).size.height,
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
gradient: const LinearGradient(
colors: [color3, color7],
begin: Alignment.bottomLeft,
end: Alignment.topRight,
),
color: color2,
boxShadow: [myBoxShadow]),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Spacer(),
Center(
child: Column(
children: [
SvgPicture.asset(
'assets/svg/wallet-money.svg',
color: Colors.white,
width: 100,
),
const Text(
"Dompet",
style: TextStyle(fontSize: 20, color: Colors.white),
),
],
),
),
const Spacer(),
const Text(
'Version 0.0.1',
style: TextStyle(color: Colors.white),
),
const SizedBox(height: 20),
],
),
),
);
}
}
| 0 |
mirrored_repositories/dompet-app/dompet/lib/pages/home | mirrored_repositories/dompet-app/dompet/lib/pages/home/widgets/custom_drawer.dart | import 'package:dompet/constant/constant.dart';
import 'package:dompet/models/menu_model.dart';
import 'package:flutter/material.dart';
class CustomDrawer extends StatefulWidget {
const CustomDrawer({super.key});
@override
State<CustomDrawer> createState() => _CustomDrawerState();
}
class _CustomDrawerState extends State<CustomDrawer> {
late final bool isActive;
// menu function
void _toggleActive(int index) {
setState(() {
for (var item in menuData) {
item.isActive = false;
}
menuData[index].isActive = true;
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: color7.withOpacity(0.2),
body: Container(
padding: const EdgeInsets.all(20),
width: MediaQuery.of(context).size.width * 0.9,
height: MediaQuery.of(context).size.height,
decoration: const BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topRight: Radius.circular(50),
bottomRight: Radius.circular(35),
),
),
child: Column(
children: [
const BuildTopSidebar(),
const SizedBox(height: 10),
SizedBox(
height: 500,
// width: MediaQuery.of(context).size.width * 0.8,
child: ListView.builder(
itemCount: menuData.length,
itemBuilder: (context, index) {
return Padding(
padding: const EdgeInsets.only(bottom: 20.0),
child: GestureDetector(
onTap: () {
_toggleActive(index);
},
child: Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
color: menuData[index].isActive
? const Color(0xFF5BCFC6).withOpacity(0.2)
: Colors.white,
borderRadius: BorderRadius.circular(10),
),
child: Row(
children: [
menuData[index].isActive
? Icon(
menuData[index].icon,
color: const Color(0xFF5BCFC6),
size: 30,
)
: Icon(
menuData[index].icon,
color: const Color(0xFF5BCFC6),
size: 30,
),
const SizedBox(width: 10),
menuData[index].isActive
? Text(
menuData[index].menuTitle,
style: const TextStyle(
color: Color(0xFF5BCFC6),
),
)
: Text(
menuData[index].menuTitle,
style: const TextStyle(
color: Color(0xFF5BCFC6),
),
),
const Spacer(),
menuData[index].isActive
? Icon(
menuData[index].iconMore,
color: const Color(0xFF5BCFC6),
)
: Icon(
menuData[index].iconMore,
color: const Color(0xFF5BCFC6),
)
],
),
),
),
);
},
),
),
const Spacer(),
Row(
children: [
const Text(
"Logout",
style: TextStyle(color: Color(0xFF5BCFC6), fontSize: 20),
),
const Spacer(),
IconButton(
onPressed: () {},
icon: const Icon(
Icons.logout,
size: 30,
color: Color(0xFF5BCFC6),
),
),
],
)
],
),
),
);
}
}
class BuildTopSidebar extends StatelessWidget {
const BuildTopSidebar({
super.key,
});
@override
Widget build(BuildContext context) {
return Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
const CircleAvatar(
radius: 37,
backgroundColor: Colors.white,
child: CircleAvatar(
radius: 35,
backgroundImage: AssetImage("assets/images/3.jpeg"),
),
),
const SizedBox(width: 10),
const Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Samuel",
style: TextStyle(color: Colors.black, fontSize: 20),
),
Text(
"@samuel",
style: TextStyle(color: Colors.black),
),
SizedBox(height: 20),
Padding(
padding: EdgeInsets.symmetric(horizontal: 20),
),
],
),
const Spacer(),
GestureDetector(
onTap: () {
Navigator.pop(context);
},
child: Container(
alignment: Alignment.center,
height: 45,
width: 45,
decoration: const BoxDecoration(
shape: BoxShape.circle,
),
child: Container(
padding: const EdgeInsets.all(5),
decoration: BoxDecoration(
color: const Color(0xFF5BCFC6).withOpacity(0.2),
borderRadius: BorderRadius.circular(50)),
child: const Center(
child: Icon(
Icons.arrow_back_ios_rounded,
color: Colors.black54,
size: 20,
),
),
),
),
)
],
);
}
}
| 0 |
mirrored_repositories/dompet-app/dompet/lib/pages/home | mirrored_repositories/dompet-app/dompet/lib/pages/home/widgets/card_info.dart | import 'package:dompet/constant/constant.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
class CardInfo extends StatelessWidget {
const CardInfo({super.key});
@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.all(20),
margin: const EdgeInsets.symmetric(horizontal: 20),
height: 200,
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
gradient: const LinearGradient(
colors: [color3, color7],
begin: Alignment.bottomLeft,
end: Alignment.topRight,
),
color: color2,
borderRadius: BorderRadius.circular(20),
boxShadow: [myBoxShadow]),
child: Column(
children: [
Row(
children: [
Column(
children: [
Container(
padding: const EdgeInsets.all(20),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Colors.white.withOpacity(0.3),
),
child: SvgPicture.asset(
"assets/svg/wallet-money.svg",
color: Colors.white,
width: 40,
),
)
],
),
const SizedBox(width: 20),
const Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Get manage by Dompet",
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.w600,
fontSize: 20),
),
SizedBox(height: 7),
Text(
"Virtual Assistent",
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.w600,
fontSize: 20),
),
],
),
],
),
const Spacer(),
Row(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.end,
children: [
Container(
padding:
const EdgeInsets.symmetric(horizontal: 10, vertical: 5),
decoration: BoxDecoration(
color: color1,
borderRadius: BorderRadius.circular(20),
),
child: TextButton(
onPressed: () {},
child: const Row(
children: [
Text(
"Learn More",
style: TextStyle(color: Colors.white),
),
Icon(
Icons.arrow_forward,
color: Colors.white,
)
],
),
),
)
],
)
],
),
);
}
}
| 0 |
mirrored_repositories/dompet-app/dompet/lib/pages/home | mirrored_repositories/dompet-app/dompet/lib/pages/home/widgets/previeous_transaction_card.dart | import 'package:dompet/constant/constant.dart';
import 'package:dompet/models/transaction_model.dart';
import 'package:dompet/pages/home/widgets/head_title.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
class PrevieousTransaction extends StatefulWidget {
const PrevieousTransaction({
super.key,
});
@override
State<PrevieousTransaction> createState() => _PrevieousTransactionState();
}
class _PrevieousTransactionState extends State<PrevieousTransaction> {
@override
Widget build(BuildContext context) {
return Container(
margin: const EdgeInsets.symmetric(horizontal: 20),
padding: const EdgeInsets.all(15),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20),
boxShadow: [myBoxShadow],
),
child: Column(
children: [
const BuildHeadTitle(
headTitle: 'Previous Transaction',
labelTitle: 'lorem ipsum dolor set amet, concentor',
),
_tabSection(),
],
),
);
}
Widget _tabSection() {
return DefaultTabController(
length: 3,
child: Builder(
builder: (BuildContext context) {
return Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
margin: const EdgeInsets.only(top: 20),
padding: const EdgeInsets.all(1),
decoration: BoxDecoration(
color: Colors.grey.withOpacity(0.5),
borderRadius: BorderRadius.circular(15),
),
child: TabBar(
padding: const EdgeInsets.all(4),
splashBorderRadius:
const BorderRadius.all(Radius.circular(10)),
isScrollable: true,
indicatorSize: TabBarIndicatorSize.label,
tabs: [
Tab(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
),
padding: const EdgeInsets.symmetric(
horizontal: 20,
vertical: 10,
),
child: const Text(
"Monthly",
style: TextStyle(
color:
Colors.white, // white if selected, grey if not
),
),
),
),
Tab(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
),
padding: const EdgeInsets.symmetric(
horizontal: 20,
vertical: 10,
),
child: const Text(
"Weekly",
style: TextStyle(
color: Colors.white,
),
),
),
),
Tab(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
),
padding: const EdgeInsets.symmetric(
horizontal: 20,
vertical: 10,
),
child: const Text(
"Today",
style: TextStyle(
color: Colors.white,
),
),
),
),
],
indicator: BoxDecoration(
color: Colors.red, // Color for the selected tab
borderRadius: BorderRadius.circular(8),
),
),
),
const SizedBox(height: 20),
SizedBox(
height: MediaQuery.of(context).size.height / 3,
child: TabBarView(
children: [
ListView.builder(
itemCount: transactionItemData.length,
itemBuilder: (context, index) {
return _listItem(context, index);
},
),
ListView.builder(
itemCount: transactionItemData.length,
itemBuilder: (context, index) {
return _listItem(context, index);
},
),
ListView.builder(
itemCount: transactionItemData.length,
itemBuilder: (context, index) {
return _listItem(context, index);
},
),
],
),
),
],
);
},
),
);
}
Widget _listItem(context, index) {
return Container(
height: 85,
margin: const EdgeInsets.only(bottom: 10),
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 0),
decoration: BoxDecoration(
color: color4.withOpacity(0.1),
borderRadius: BorderRadius.circular(10),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Row(
children: [
Container(
height: 50,
width: 50,
padding: const EdgeInsets.all(5),
decoration: BoxDecoration(
color: transactionItemData[index].color.withOpacity(0.3),
borderRadius: BorderRadius.circular(10),
),
child: SvgPicture.asset(
"assets/svg/right-arrow.svg",
color: transactionItemData[index].color,
),
),
const SizedBox(width: 10),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(transactionItemData[index].text1),
const SizedBox(height: 5),
Text(transactionItemData[index].text2),
],
),
],
),
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(transactionItemData[index].date),
const SizedBox(height: 5),
Text(transactionItemData[index].time),
],
)
],
),
);
}
}
| 0 |
mirrored_repositories/dompet-app/dompet/lib/pages/home | mirrored_repositories/dompet-app/dompet/lib/pages/home/widgets/spend_button.dart | import 'package:flutter/material.dart';
import '../../../../constant/constant.dart';
class BuildSpendingButton extends StatelessWidget {
const BuildSpendingButton({
super.key,
});
@override
Widget build(BuildContext context) {
return SizedBox(
width: MediaQuery.of(context).size.width,
child: TextButton(
style: TextButton.styleFrom(
padding: const EdgeInsets.symmetric(vertical: 17),
shape: RoundedRectangleBorder(
side: const BorderSide(color: color3),
borderRadius: BorderRadius.circular(15),
),
backgroundColor: Colors.white,
),
onPressed: () {},
child: const Text(
"View More",
style: TextStyle(color: color3),
),
),
);
}
}
| 0 |
mirrored_repositories/dompet-app/dompet/lib/pages/home | mirrored_repositories/dompet-app/dompet/lib/pages/home/widgets/custom_circleavatar.dart | import 'package:flutter/material.dart';
import '/../../models/model.dart';
class BuildCircleAvatar extends StatelessWidget {
const BuildCircleAvatar({
super.key,
});
@override
Widget build(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text("Recent User"),
SizedBox(
height: 100,
width: MediaQuery.of(context).size.width,
child: Stack(
alignment: Alignment.center,
children: [
Positioned(
left: 10,
child: CircleAvatar(
radius: 30,
backgroundImage: AssetImage(imageData[2].image),
),
), // Front image
Positioned(
left: 50,
child: CircleAvatar(
radius: 34,
backgroundColor: Colors.white,
child: CircleAvatar(
radius: 30,
backgroundImage: AssetImage(imageData[1].image),
),
),
), // Front image
Positioned(
left: 100,
child: CircleAvatar(
radius: 34,
backgroundColor: Colors.white,
child: CircleAvatar(
radius: 30,
backgroundImage: AssetImage(imageData[0].image),
),
),
), // Front image
Positioned(
left: 150,
child: CircleAvatar(
radius: 34,
backgroundColor: Colors.white,
child: CircleAvatar(
radius: 30,
backgroundImage: AssetImage(imageData[4].image),
),
),
),
const Positioned(
left: 200,
child: BuildAvatarButton(),
)
// Front image
],
),
),
const Text("Insert Amount"),
],
);
}
}
class BuildAvatarButton extends StatelessWidget {
const BuildAvatarButton({
super.key,
});
@override
Widget build(BuildContext context) {
return CircleAvatar(
radius: 30,
backgroundColor: Colors.white,
child: Container(
height: 50,
width: 50,
decoration: BoxDecoration(
color: Colors.green,
borderRadius: BorderRadius.circular(50),
),
child: TextButton(
onPressed: () {},
child: const Center(
child: Icon(
Icons.arrow_forward_ios_rounded,
color: Colors.white,
),
),
),
),
);
}
}
| 0 |
mirrored_repositories/dompet-app/dompet/lib/pages/home | mirrored_repositories/dompet-app/dompet/lib/pages/home/widgets/invoice_card.dart | import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import '/../../constant/constant.dart';
class BuildInvoiceCard extends StatefulWidget {
const BuildInvoiceCard({
super.key,
required this.context,
required this.color,
required this.icon,
required this.title,
required this.description,
});
final BuildContext context;
final Color color;
final String icon;
final String title;
final String description;
@override
State<BuildInvoiceCard> createState() => _BuildInvoiceCardState();
}
class _BuildInvoiceCardState extends State<BuildInvoiceCard> {
@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.symmetric(horizontal: 20),
margin: const EdgeInsets.symmetric(horizontal: 20, vertical: 10),
height: 130,
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(35),
color: widget.color,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
padding: const EdgeInsets.all(15),
width: 70,
height: 70,
decoration: BoxDecoration(
color: white.withOpacity(0.2),
borderRadius: BorderRadius.circular(40),
),
child: Center(
child: SvgPicture.asset(
widget.icon,
width: 40,
color: white,
),
),
),
],
),
const SizedBox(width: 20),
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
widget.title,
style: const TextStyle(color: white, fontSize: 30),
),
const SizedBox(height: 5),
Text(
widget.description,
style: const TextStyle(color: white2, fontSize: 15),
),
],
),
],
),
);
}
}
| 0 |
mirrored_repositories/dompet-app/dompet/lib/pages/home | mirrored_repositories/dompet-app/dompet/lib/pages/home/widgets/card_overview.dart | import 'package:dompet/models/model.dart';
import 'package:dompet/pages/home/widgets/head_title.dart';
import 'package:flutter/material.dart';
import '/../../constant/constant.dart';
class BuildCardOverview extends StatelessWidget {
const BuildCardOverview({
super.key,
});
@override
Widget build(BuildContext context) {
return Container(
margin: const EdgeInsets.symmetric(horizontal: 20, vertical: 20),
padding: const EdgeInsets.all(15),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(30),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.2), // Shadow color
spreadRadius: 5, // Spread radius
blurRadius: 7, // Blur radius
offset: const Offset(0, 3), // Offset in the x and y direction
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
mainCard(context),
const SizedBox(height: 15),
const BuildHeadTitle(
headTitle: "Card's Overview",
labelTitle: 'lorem ipsum dolor set amet'),
const SizedBox(height: 25),
SizedBox(
height: 160, // Set an appropriate height for your use case
child: ListView.builder(
itemCount: demoData.length,
itemBuilder: (BuildContext context, int index) {
return BuildListTile(index);
},
),
),
const SizedBox(height: 20),
Center(
child: Image.asset("assets/svg/matrix.png"),
),
],
),
);
}
// ignore: non_constant_identifier_names
Widget BuildListTile(int index) {
return Padding(
padding: const EdgeInsets.only(bottom: 20),
child: Row(
children: [
Container(
height: 20,
width: 20,
decoration: BoxDecoration(
color: demoListData[index].color,
borderRadius: BorderRadius.circular(20),
),
),
const SizedBox(width: 10),
Text(demoListData[index].text),
const Spacer(),
Text(demoListData[index].percentage),
],
),
);
}
Container mainCard(BuildContext context) {
return Container(
padding: const EdgeInsets.all(20),
height: 170,
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
color: color7,
borderRadius: BorderRadius.circular(25),
),
child: Row(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: 50,
width: 50,
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.5),
borderRadius: BorderRadius.circular(100),
),
),
const SizedBox(height: 10),
const Text(
"\$59303.393",
style: TextStyle(fontSize: 25, color: Colors.white),
),
const SizedBox(height: 10),
const Text(
"Wallet Ballance",
style: TextStyle(color: Colors.white),
),
],
),
const Spacer(),
Column(
children: [
Container(
padding: const EdgeInsets.all(5),
width: 50,
height: 130,
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.5),
borderRadius: BorderRadius.circular(15),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Icon(
Icons.refresh_outlined,
color: Colors.white,
),
RotatedBox(
quarterTurns: 1,
child: RichText(
text: const TextSpan(
text: 'Change',
style: TextStyle(color: Colors.black54),
),
),
),
const Icon(
Icons.arrow_drop_down,
color: Colors.white,
),
],
),
)
],
)
],
),
);
}
}
| 0 |
mirrored_repositories/dompet-app/dompet/lib/pages/home | mirrored_repositories/dompet-app/dompet/lib/pages/home/widgets/notification.dart | import 'package:flutter/material.dart';
import '/../../constant/constant.dart';
class DotNotification extends StatelessWidget {
final String countNotif;
const DotNotification({super.key, required this.countNotif});
@override
Widget build(BuildContext context) {
return Container(
height: 20,
width: 20,
decoration: BoxDecoration(
color: color3,
borderRadius: BorderRadius.circular(20),
),
child: Center(
child: Text(countNotif),
),
);
}
}
| 0 |
mirrored_repositories/dompet-app/dompet/lib/pages/home | mirrored_repositories/dompet-app/dompet/lib/pages/home/widgets/card_spendings.dart | import 'package:dompet/pages/home/widgets/head_title.dart';
import 'package:dompet/pages/home/widgets/spend_button.dart';
import 'package:dompet/pages/home/widgets/list_progres_item.dart';
import 'package:flutter/material.dart';
import '../../../../constant/constant.dart';
class BuildSpendingsCard extends StatefulWidget {
const BuildSpendingsCard({
super.key,
});
@override
State<BuildSpendingsCard> createState() => _BuildSpendingsCardState();
}
class _BuildSpendingsCardState extends State<BuildSpendingsCard> {
@override
Widget build(BuildContext context) {
return Container(
margin: const EdgeInsets.symmetric(horizontal: 20),
padding: const EdgeInsets.all(15),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20),
boxShadow: [myBoxShadow],
),
child: const Column(
children: [
BuildHeadTitle(
headTitle: 'Spendings',
labelTitle: 'lorem ipsum dolor set amet, concentor'),
SizedBox(height: 30),
BuildListProgresItem(),
SizedBox(height: 20),
BuildSpendingButton(),
],
),
);
}
}
| 0 |
mirrored_repositories/dompet-app/dompet/lib/pages/home | mirrored_repositories/dompet-app/dompet/lib/pages/home/widgets/head_title.dart | import 'package:flutter/material.dart';
class BuildHeadTitle extends StatefulWidget {
final String headTitle;
final String labelTitle;
const BuildHeadTitle({
super.key,
required this.headTitle,
required this.labelTitle,
});
@override
State<BuildHeadTitle> createState() => _BuildHeadTitleState();
}
class _BuildHeadTitleState extends State<BuildHeadTitle> {
@override
Widget build(BuildContext context) {
return Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
widget.headTitle,
style: TextStyle(fontSize: 20),
),
SizedBox(height: 10),
Text(widget.labelTitle),
],
),
Icon(Icons.more_vert_outlined)
],
);
}
}
| 0 |
mirrored_repositories/dompet-app/dompet/lib/pages/home | mirrored_repositories/dompet-app/dompet/lib/pages/home/widgets/list_progres_item.dart | import 'package:flutter/material.dart';
import 'package:getwidget/components/progress_bar/gf_progress_bar.dart';
import '/../../models/model.dart';
class BuildListProgresItem extends StatelessWidget {
const BuildListProgresItem({
super.key,
});
@override
Widget build(BuildContext context) {
return SizedBox(
height: 200,
child: ListView.builder(
itemCount: progressData.length,
itemBuilder: (contex, index) {
return SizedBox(
// color: color1,
height: 50,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
GFProgressBar(
percentage: progressData[index].percentage,
lineHeight: progressData[index].lineHeight,
backgroundColor: progressData[index].bgColor,
progressBarColor: progressData[index].progresBarColor,
child: Padding(
padding: const EdgeInsets.only(right: 5),
child: Text(
'${(progressData[index].percentage * 100).round()} %',
textAlign: TextAlign.end,
style: const TextStyle(
fontSize: 16,
color: Colors.black54,
),
),
),
),
const SizedBox(height: 10),
Text(progressData[index].label),
],
),
);
},
),
);
}
}
| 0 |
mirrored_repositories/dompet-app/dompet/lib/pages/home | mirrored_repositories/dompet-app/dompet/lib/pages/home/widgets/quick_transfer.dart | import 'package:dompet/pages/home/widgets/custom_circleavatar.dart';
import 'package:dompet/pages/home/widgets/head_title.dart';
import 'package:flutter/material.dart';
import '/../../constant/constant.dart';
class BuildQuicTransfer extends StatefulWidget {
const BuildQuicTransfer({
super.key,
});
@override
State<BuildQuicTransfer> createState() => _BuildQuicTransferState();
}
class _BuildQuicTransferState extends State<BuildQuicTransfer> {
int amount = 10000;
@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.all(20),
margin: const EdgeInsets.symmetric(horizontal: 20, vertical: 25),
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.2), // Shadow color
spreadRadius: 5, // Spread radius
blurRadius: 7, // Blur radius
offset: const Offset(0, 3), // Offset in the x and y direction
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const BuildHeadTitle(
headTitle: 'Quick Transfer',
labelTitle: 'lorem ipsum dolor set amet, concentor'),
const SizedBox(height: 10),
const SizedBox(height: 10),
Container(
padding: const EdgeInsets.all(15),
decoration: BoxDecoration(
color: color4.withOpacity(0.2),
borderRadius: BorderRadius.circular(10),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Column(
children: [
Row(
children: [
CircleAvatar(
// backgroundImage: NetworkImage(
// 'https://picsum.photos/id/237/200/300'),
),
SizedBox(width: 10),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Samuel"),
Text("@samuel"),
],
),
],
),
],
),
const SizedBox(width: 20),
Container(
decoration: BoxDecoration(
color: Colors.grey.withOpacity(0.4),
borderRadius: BorderRadius.circular(20),
),
padding: const EdgeInsets.all(5),
child: const Icon(
Icons.check,
color: Colors.white,
))
],
),
),
const SizedBox(height: 20),
const BuildCircleAvatar(),
const SizedBox(height: 10),
Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Text(
"$amount",
style: const TextStyle(
fontSize: 32.0,
),
),
Slider(
label: "Select Amount",
value: amount.toDouble(),
onChanged: (value) {
setState(() {
amount = value.toInt();
});
},
min: 10000,
max: 100000,
),
],
),
const Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("Your Balance"),
Text("\$100.000"),
],
),
const SizedBox(height: 20),
SizedBox(
width: MediaQuery.of(context).size.width,
height: 50,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: color3,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15))),
onPressed: () {},
child: const Text("Submit"),
),
)
],
),
);
}
}
| 0 |
mirrored_repositories/dompet-app/dompet/lib/pages/home | mirrored_repositories/dompet-app/dompet/lib/pages/home/widgets/insight.dart | import 'package:flutter/material.dart';
class InsightGraph extends StatelessWidget {
final List<double> dataPoints;
final double barWidth;
final double maxBarHeight;
const InsightGraph({
Key? key,
required this.dataPoints,
this.barWidth = 20.0,
this.maxBarHeight = 100.0,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Row(
children: dataPoints.map((data) {
final barHeight = data * maxBarHeight;
return Container(
width: barWidth,
height: barHeight,
margin: const EdgeInsets.symmetric(horizontal: 8.0),
decoration: BoxDecoration(
color: Colors.blue,
borderRadius: BorderRadius.circular(15),
),
);
}).toList(),
);
}
}
| 0 |
mirrored_repositories/dompet-app/dompet/lib/pages/home | mirrored_repositories/dompet-app/dompet/lib/pages/home/widgets/app_bar.dart | import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import '/../../constant/constant.dart';
class BuildAppBar extends StatelessWidget {
const BuildAppBar({
super.key,
});
@override
Widget build(BuildContext context) {
return Row(
children: [
SvgPicture.asset(
"assets/svg/wallet-money.svg",
color: color3,
width: 50,
),
const SizedBox(width: 10),
SvgPicture.asset(
"assets/svg/burger-menu.svg",
width: 50,
),
],
);
}
}
| 0 |
mirrored_repositories/dompet-app/dompet/lib | mirrored_repositories/dompet-app/dompet/lib/models/menu_model.dart | import 'package:flutter/material.dart';
class MenuModel {
final IconData icon, iconMore;
// ignore: non_constant_identifier_names
final String menuTitle;
bool isActive;
MenuModel({
required this.icon,
required this.iconMore,
required this.menuTitle,
required this.isActive,
});
}
List<MenuModel> menuData = [
MenuModel(
icon: Icons.home,
iconMore: Icons.arrow_forward_ios_rounded,
menuTitle: 'Home',
isActive: false,
),
MenuModel(
icon: Icons.insights,
iconMore: Icons.arrow_forward_ios_rounded,
menuTitle: 'Graph',
isActive: false,
),
MenuModel(
icon: Icons.settings,
iconMore: Icons.arrow_forward_ios_rounded,
menuTitle: 'Setting',
isActive: false),
];
| 0 |
mirrored_repositories/dompet-app/dompet/lib | mirrored_repositories/dompet-app/dompet/lib/models/transaction_model.dart | import 'package:dompet/constant/constant.dart';
import 'package:flutter/material.dart';
class TransactionModel {
final String text1;
final String text2;
final String svgIcon;
final Color color;
final String date;
final String time;
TransactionModel(
{required this.text1,
required this.text2,
required this.svgIcon,
required this.color,
required this.date,
required this.time});
}
List<TransactionModel> transactionItemData = [
TransactionModel(
text1: 'Cindi',
text2: 'Cashback',
svgIcon: 'assets/svg/shape-oval.svg',
color: color1,
date: 'June 4, 2020',
time: '05:34:35',
),
TransactionModel(
text1: 'Adi',
text2: 'Cashback',
svgIcon: 'assets/svg/shape-oval.svg',
color: color2,
date: 'June 5, 2021',
time: '07:34:35',
),
TransactionModel(
text1: 'Fani',
text2: 'Cashback',
svgIcon: 'assets/svg/shape-oval.svg',
color: color3,
date: 'June 4, 2023',
time: '08:34:35',
),
TransactionModel(
text1: 'Reni',
text2: 'Cashback',
svgIcon: 'assets/svg/shape-oval.svg',
color: color4,
date: 'June 4, 2023',
time: '08:34:35',
),
TransactionModel(
text1: 'Rena',
text2: 'Cashback',
svgIcon: 'assets/svg/shape-oval.svg',
color: color5,
date: 'June 4, 2023',
time: '08:34:35',
)
];
| 0 |
mirrored_repositories/dompet-app/dompet/lib | mirrored_repositories/dompet-app/dompet/lib/models/model.dart | import 'package:dompet/constant/constant.dart';
import 'package:flutter/material.dart';
// item class
class Items {
final String title;
final String icon;
final String description;
final Color color;
Items(
{required this.title,
required this.icon,
required this.description,
required this.color});
}
// demo data
final List<Items> demoData = [
Items(
title: '9940',
icon: 'assets/svg/receipt.svg',
description: 'Total Invoice',
color: color1,
),
Items(
title: '6843',
icon: 'assets/svg/checkmark-outline.svg',
description: 'Paid Invoice',
color: color2,
),
Items(
title: '58333',
icon: 'assets/svg/xmark-circle-thin.svg',
description: 'Unpaid Invoice',
color: color5,
),
Items(
title: '58333',
icon: 'assets/svg/bill.svg',
description: 'Total Invoice Sent',
color: color4,
),
];
// < ---------------------------------------------------------------- >
// list tile class
class ListTile {
final String text;
final String percentage;
final Color color;
ListTile({required this.text, required this.percentage, required this.color});
}
// demo data list tile
final List<ListTile> demoListData = [
ListTile(
text: 'Account',
percentage: '20%',
color: color1,
),
ListTile(
text: 'Service',
percentage: '40%',
color: color2,
),
ListTile(
text: 'Restourant',
percentage: '10%',
color: color3,
),
ListTile(
text: 'Other',
percentage: '30%',
color: color4,
),
];
// < ---------------------------------------------------------------- >
// image class
class Images {
final String image;
final double leftValue;
final double radiusValue1;
final double radiusValue2;
Images(
{required this.image,
required this.leftValue,
required this.radiusValue1,
required this.radiusValue2});
}
// stack circle avatar image
List<Images> imageData = [
Images(
image: 'assets/images/1.jpeg',
leftValue: 0,
radiusValue1: 34,
radiusValue2: 0,
),
Images(
image: 'assets/images/2.jpeg',
leftValue: 50,
radiusValue1: 34,
radiusValue2: 30,
),
Images(
image: 'assets/images/3.jpeg',
leftValue: 100,
radiusValue1: 34,
radiusValue2: 30,
),
Images(
image: 'assets/images/4.jpeg',
leftValue: 150,
radiusValue1: 34,
radiusValue2: 30,
),
Images(
image: 'assets/images/5.jpeg',
leftValue: 200,
radiusValue1: 34,
radiusValue2: 30,
),
];
// < ---------------------------------------------------------------- >
// Liner progres bar
class LinearProgresBar {
final String label;
final double percentage;
final double lineHeight;
final Color bgColor;
final Color progresBarColor;
LinearProgresBar({
required this.label,
required this.percentage,
required this.lineHeight,
required this.bgColor,
required this.progresBarColor,
});
}
List<LinearProgresBar> progressData = [
LinearProgresBar(
label: 'Inversment',
percentage: 0.5,
lineHeight: 20,
bgColor: Colors.black87.withOpacity(0.1),
progresBarColor: color2,
),
LinearProgresBar(
label: 'Restaurant',
percentage: 0.7,
lineHeight: 20,
bgColor: Colors.black87.withOpacity(0.1),
progresBarColor: color3,
),
LinearProgresBar(
label: 'Properti',
percentage: 0.3,
lineHeight: 20,
bgColor: Colors.black87.withOpacity(0.1),
progresBarColor: color4,
)
];
| 0 |
mirrored_repositories/dompet-app/dompet/lib | mirrored_repositories/dompet-app/dompet/lib/constant/constant.dart | // Colors
import 'package:flutter/material.dart';
const Color color1 = Color(0xFFFFA755); // FFA755
const Color color2 = Color.fromARGB(255, 102, 195, 100); // 68E366
const Color color3 = Color(0xFF5BCFC6); // B58DD3
const Color color4 = Color(0xFF709FB9); // 709FB9
const Color color5 = Color(0xFFB58DD3); // 7A73E7
const Color color6 = Color(0xFFA9C6D6); // 7A73E7
const Color color7 = Color(0xFF4A6ECC); // 7A73E7
const Color white = Colors.white; // 7A73E7
const Color white2 = Colors.white60; // 7A73E7
// box shadow
BoxShadow myBoxShadow = BoxShadow(
color: Colors.black.withOpacity(0.2),
blurRadius: 10.0,
spreadRadius: 2.0,
offset: const Offset(4.0, 4.0),
);
| 0 |
mirrored_repositories/dompet-app/dompet | mirrored_repositories/dompet-app/dompet/test/widget_test.dart | // This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility in the flutter_test package. 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:dompet/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);
});
}
| 0 |
mirrored_repositories/Phoenix-Travel-Turkey-App | mirrored_repositories/Phoenix-Travel-Turkey-App/lib/main.dart | import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:phoenix_travel_app/src/views/splash/splash_screen.dart';
void main() {
runApp(const PhoenixTurkeyApp());
}
class PhoenixTurkeyApp extends StatelessWidget {
const PhoenixTurkeyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown,
]);
return MaterialApp(
title: 'Phoenix tour of Turkey',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const SplashScreen(title: 'Phoenix tour of Turkey'),
);
}
} | 0 |
mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views | mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/days_itenarary/itenarary.dart | import 'package:flutter/material.dart';
import 'package:phoenix_travel_app/src/core/constants.dart';
import 'package:phoenix_travel_app/src/core/size_config.dart';
import 'package:phoenix_travel_app/src/views/days_itenarary/days_screens/day1.dart';
import 'package:phoenix_travel_app/src/views/days_itenarary/days_screens/day2.dart';
import 'package:phoenix_travel_app/src/views/days_itenarary/days_screens/day3.dart';
import 'package:phoenix_travel_app/src/views/days_itenarary/days_screens/day4.dart';
import 'package:phoenix_travel_app/src/views/days_itenarary/days_screens/day5.dart';
import 'package:phoenix_travel_app/src/views/days_itenarary/days_screens/day6.dart';
import 'package:phoenix_travel_app/src/views/days_itenarary/days_screens/day7.dart';
import 'package:phoenix_travel_app/src/views/days_itenarary/days_screens/day8.dart';
class ItenararyScreen extends StatefulWidget {
const ItenararyScreen({
Key? key,
}) : super(key: key);
@override
_ItenararyScreenState createState() => _ItenararyScreenState();
}
class _ItenararyScreenState extends State<ItenararyScreen> {
int selectedIndex = 0;
bool d1 = true;
bool d2 = false;
bool d3 = false;
bool d4 = false;
bool d5 = false;
bool d6 = false;
bool d7 = false;
bool d8 = false;
bool t1 = true;
bool t2 = false;
bool t3 = false;
bool t4 = false;
bool t5 = false;
bool t6 = false;
bool t7 = false;
bool t8 = false;
@override
Widget build(BuildContext context) {
SizeConfig().init(context);
return SafeArea(
child: Scaffold(
body: Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
// height: 80,
// width: getProportionateScreenWidth(375.0),
padding: const EdgeInsets.all(10.0),
decoration: BoxDecoration(
borderRadius: const BorderRadius.only(
bottomRight: Radius.circular(40.0),
bottomLeft: Radius.circular(40.0),
),
gradient: LinearGradient(
begin: Alignment.bottomCenter,
end: Alignment.topCenter,
colors: [
baseBlackPure,
basePurpleDark,
],
),
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Padding(
padding:
const EdgeInsets.only(left: 10.0, right: 20.0),
child: Icon(
Icons.arrow_back_rounded,
size: 30,
color: baseWhitePlain,
),
),
),
Text(
"Tour Itinerary",
textAlign: TextAlign.center,
style: TextStyle(
fontWeight: FontWeight.bold,
color: baseWhitePlain,
fontSize: 24,
),
),
],
),
SizedBox(
child: Padding(
padding: const EdgeInsets.all(10.0),
child: Wrap(
crossAxisAlignment: WrapCrossAlignment.center,
children: [
_dayCard(daysList[0], 0),
_dayCard(daysList[1], 1),
_dayCard(daysList[2], 2),
_dayCard(daysList[3], 3),
_dayCard(daysList[4], 4),
_dayCard(daysList[5], 5),
_dayCard(daysList[6], 6),
_dayCard(daysList[7], 7),
],
)),
),
],
),
),
/// center
if (selectedIndex == 0)
Day1Screen(day: dateList[0], temp: tempList[0],)
else if (selectedIndex == 1)
Day2Screen(day: dateList[1], temp: tempList[1],)
else if (selectedIndex == 2)
Day3Screen(day: dateList[2], temp: tempList[2],)
else if (selectedIndex == 3)
Day4Screen(day: dateList[3], temp: tempList[3],)
else if (selectedIndex == 4)
Day5Screen(day: dateList[4], temp: tempList[4],)
else if (selectedIndex == 5)
Day6Screen(day: dateList[5], temp: tempList[5],)
else if (selectedIndex == 6)
Day7Screen(day: dateList[6], temp: tempList[6],)
else if (selectedIndex == 7)
Day8Screen(day: dateList[7], temp: tempList[7],)
/// center
],
),
bottomNavigationBar: Container(
color: baseWhitePlain,
width: getProportionateScreenWidth(375.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
SizedBox(
width: getProportionateScreenWidth(120.0),
child: Image.asset(
"assets/logo.png",
),
),
SizedBox(
width: getProportionateScreenWidth(120.0),
child: Image.asset(
"assets/bottom_icn.png",
),
),
],
),
),
),
);
}
Widget _dayCard(day, i) {
return GestureDetector(
onTap: () {
setState(() {
selectedIndex = i;
});
},
child: Card(
color: selectedIndex == i ? basePurpleDark : baseWhitePlain,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(3.0)),
child: Padding(
padding: const EdgeInsets.only(
left: 10.0, right: 10.0, top: 5.0, bottom: 5.0),
child: Text(
day,
textAlign: TextAlign.center,
overflow: TextOverflow.visible,
style: TextStyle(
fontWeight: FontWeight.bold,
color: selectedIndex == i ? baseWhitePlain : basePurpleDark,
// fontSize: 16,
),
),
),
),
);
}
List<String> daysList = [
'Day 01',
'Day 02',
'Day 03',
'Day 04',
'Day 05',
'Day 06',
'Day 07',
'Day 08',
];
List<String> dayImages = [
'assets/day1.png',
'assets/day2.png',
'assets/day3.png',
'assets/day3.png',
'assets/day3.png',
'assets/day3.png',
'assets/day3.png',
'assets/day3.png',
];
final List<String> tempList = [
'18 °C / 7 °C',
'13 °C / 4 °C',
'9 °C / -2 °C',
'6 °C / -4 °C',
'9 °C / 4 °C',
'11 °C / 4 °C',
'11 °C / 5 °C',
'10 °C / 4 °C',
];
final List<String> dateList = [
'21 February 2022',
'22 February 2022',
'23 February 2022',
'24 February 2022',
'25 February 2022',
'26 February 2022',
'27 February 2022',
'28 February 2022',
];
}
| 0 |
mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/days_itenarary | mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/days_itenarary/components/daybox.dart | import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:phoenix_travel_app/src/core/constants.dart';
class DayScheduleCard extends StatelessWidget {
final String image;
final String details;
final String hrs;
const DayScheduleCard({
Key? key,
required this.image,
required this.details,
required this.hrs,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return SizedBox(
// height: 150.0,
// width: getProportionateScreenWidth(340.0),
child: Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15.0),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 100,
// height: double.maxFinite,
alignment: Alignment.center,
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(image),
alignment: Alignment.center,
fit: BoxFit.fill,
),
borderRadius: BorderRadius.circular(15.0),
),
padding: const EdgeInsets.all(5.0),
child: Center(
child: Padding(
padding: const EdgeInsets.all(5.0),
child: Text(
hrs,
textAlign: TextAlign.center,
style: TextStyle(
fontWeight: FontWeight.bold,
color: baseWhitePlain,
fontSize: 16,
),
),
),
),
),
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
// textDirection: TextDirection.ltr,
mainAxisSize: MainAxisSize.min,
// textBaseline: TextBaseline.alphabetic,
children: [
Text(
details,
// textAlign: TextAlign.center,
style: TextStyle(
fontWeight: FontWeight.bold,
color: basePurpleDark,
fontSize: 12,
),
),
],
),
),
),
],
),
),
);
}
}
| 0 |
mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/days_itenarary | mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/days_itenarary/days_screens/day1.dart | import 'package:flutter/material.dart';
import 'package:phoenix_travel_app/src/core/constants.dart';
import 'package:phoenix_travel_app/src/core/size_config.dart';
import 'package:phoenix_travel_app/src/views/days_itenarary/components/daybox.dart';
class Day1Screen extends StatefulWidget {
final String day;
final String temp;
const Day1Screen({
Key? key,
required this.day,
required this.temp,
}) : super(key: key);
@override
_Day1ScreenState createState() => _Day1ScreenState();
}
class _Day1ScreenState extends State<Day1Screen> {
@override
Widget build(BuildContext context) {
return Column(
children: [
Padding(
padding: const EdgeInsets.all(5.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Card(
child: Padding(
padding: const EdgeInsets.only(
left: 12.0, right: 12.0, top: 8.0, bottom: 8.0),
child: Text(
widget.day,
textAlign: TextAlign.center,
overflow: TextOverflow.visible,
style: TextStyle(
color: basePurpleDark,
fontWeight: FontWeight.w800,
// fontSize: 16,
),
),
),
),
Card(
child: Padding(
padding: const EdgeInsets.only(
left: 12.0, right: 12.0, top: 8.0, bottom: 8.0),
child: Text(
widget.temp,
textAlign: TextAlign.center,
overflow: TextOverflow.visible,
style: TextStyle(
color: basePurpleDark,
fontWeight: FontWeight.w800,
// fontSize: 16,
),
),
),
),
],
),
),
SizedBox(
height: getProportionateScreenHeight(480.0),
child: Padding(
padding: const EdgeInsets.all(10.0),
child: ListView.builder(
itemCount: _hrs.length,
itemBuilder: (context, index) {
return DayScheduleCard(
image: "assets/Hotels/d1.png",
details: _details[index],
hrs: _hrs[index],
);
}),
),
),
],
);
}
final List<String> _details = [
'Arrival at Istanbul by TK 711 ISB-IST (RAWALPINDI |PESHAWAR)\n\nMeet & assist at the airport\n\nTransfer to Bursa by bus\n\nEn-route Lunch at Bursa Kebap Restaurant.',
'Arrival at Istanbul by TK 709 KHI-IST (KARACHI | HYDERABAD |SUKKUR |QUETTA )\n\nMeet & assist at the airport\n\nTransfer to Bursa by bus\n\nEn-route Lunch at Bursa Kebap Restaurant\n\nArrival at Bursa & Check Inn at Almira Hotel ',
'Arrival at Istanbul by TK 715 LHE-IST (LAHORE |SAHIWAL |GUJRANWALA )\n\nMeet & assist at the airport\n\nTransfer to Bursa by bus\n\nEn-route Lunch at Bursa Kebap Restaurant\n\nArrival at Bursa & Check Inn at Almira Hotel',
'Arrival at Istanbul by EK 123 DXB-IST (MULTAN | FAISALABAD )\n\nMeet & Assist at Airport\n\nTransfer to Bursa. (Pack Fast Food Lunch Will be Served)\n\nCheck inn Formalities at Movenpick Hotel\n\nTime Free For Fresh Up & Personal Activities',
'Meet & Assist at Airport\n\nTransfer to Bursa (Pack Fast Food Lunch Will be Served)\n\nCheck inn Formalities (Movenpick Hotel) \n\nTime Free For Fresh Up & Personal Activities.\n\nCheck inn Fomralities (Movenpick Hotel)\n\nTime Free For Fresh Up & Personal Activities',
'Dinner at Almirah Hotel\n\nOvernight at Hotel',
];
final List<String> _hrs = [
'1035Hrs',
'1120Hrs',
'1220Hrs',
'1425Hrs',
'1530Hrs',
'2000-2200Hrs',
];
}
| 0 |
mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/days_itenarary | mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/days_itenarary/days_screens/day3.dart | import 'package:flutter/material.dart';
import 'package:phoenix_travel_app/src/core/constants.dart';
import 'package:phoenix_travel_app/src/core/size_config.dart';
import 'package:phoenix_travel_app/src/views/days_itenarary/components/daybox.dart';
class Day3Screen extends StatefulWidget {
final String day;
final String temp;
const Day3Screen({
Key? key,
required this.day,
required this.temp,
}) : super(key: key);
@override
_Day3ScreenState createState() => _Day3ScreenState();
}
class _Day3ScreenState extends State<Day3Screen> {
@override
Widget build(BuildContext context) {
return Column(
children: [
Padding(
padding: const EdgeInsets.all(5.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Card(
child: Padding(
padding: const EdgeInsets.only(
left: 12.0, right: 12.0, top: 8.0, bottom: 8.0),
child: Text(
widget.day,
textAlign: TextAlign.center,
overflow: TextOverflow.visible,
style: TextStyle(
color: basePurpleDark,
fontWeight: FontWeight.w800,
// fontSize: 16,
),
),
),
),
Card(
child: Padding(
padding: const EdgeInsets.only(
left: 12.0, right: 12.0, top: 8.0, bottom: 8.0),
child: Text(
widget.temp,
textAlign: TextAlign.center,
overflow: TextOverflow.visible,
style: TextStyle(
color: basePurpleDark,
fontWeight: FontWeight.w800,
// fontSize: 16,
),
),
),
),
],
),
),
SizedBox(
height: getProportionateScreenHeight(480.0),
child: Padding(
padding: const EdgeInsets.all(10.0),
child: ListView.builder(
itemCount: _hrs.length,
itemBuilder: (context, index) {
return DayScheduleCard(
image: "assets/Hotels/d3.png",
details: _details[index],
hrs: _hrs[index],
);
}),
),
),
],
);
}
final List<String> _details = [
'Breakfast at Hotel\n\nCheck Out From Hotel ( Lahore |Sahiwal|Multan |Faisalabad)\n\nTransfer to Istanbul Airport for Departure Flight IST-ASR TK2012',
'Arrival at Istanbul Airport\n\nCheck Inn For Flight TK 2012 IST-ASR\n\nLunch Allowance Will be Provided\n\nCheck Out From Hotel (Karachi|Hyderabad|Sukkur|Quetta|Rawalpindi|Peshawar)',
'Transfer to Istanbul (Sabiha- Saw) Airport',
'Arrival at Saw Airport\n\nCheck Inn for Flight PC 2738 SAW-ASR Flight\n\nTransfer for lunch at Yunce Hunker',
'Departure Flight SAW-ASR ',
'Arrival By TK 2012 ( Lahore |Sahiwal|Multan |Faisalabad)\n\nMeet & Assist at Kayseri Airport\n\nTransfer to Cappadocia ',
'Arrival at Double Tree Hilton\n\nCheck Inn Formalities',
'Arrival By PC 2738 (Karachi|Hyderabad|Sukkur|Quetta|Rawalpindi|Peshawar)\n\nMeet & Assist at Kayseri Airport',
'Transfer to Cappadocia\n\nDinner at Adedaya Restaurant for all Groups\n\nOvernight at Hotel',
];
final List<String> _hrs = [
'0900Hrs',
'1200Hrs',
'1400Hrs',
'1600Hrs',
'1845Hrs ',
'1605Hrs ',
'1830Hrs ',
'1945Hrs',
'2030Hrs ',
];
}
| 0 |
mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/days_itenarary | mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/days_itenarary/days_screens/day4.dart | import 'package:flutter/material.dart';
import 'package:phoenix_travel_app/src/core/constants.dart';
import 'package:phoenix_travel_app/src/core/size_config.dart';
import 'package:phoenix_travel_app/src/views/days_itenarary/components/daybox.dart';
class Day4Screen extends StatefulWidget {
final String day;
final String temp;
const Day4Screen({Key? key,
required this.day,
required this.temp,
}) : super(key: key);
@override
_Day4ScreenState createState() => _Day4ScreenState();
}
class _Day4ScreenState extends State<Day4Screen> {
@override
Widget build(BuildContext context) {
return Column(
children: [
Padding(
padding: const EdgeInsets.all(5.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Card(
child: Padding(
padding: const EdgeInsets.only(
left: 12.0, right: 12.0, top: 8.0, bottom: 8.0),
child: Text(
widget.day,
textAlign: TextAlign.center,
overflow: TextOverflow.visible,
style: TextStyle(
color: basePurpleDark,
fontWeight: FontWeight.w800,
// fontSize: 16,
),
),
),
),
Card(
child: Padding(
padding: const EdgeInsets.only(
left: 12.0, right: 12.0, top: 8.0, bottom: 8.0),
child: Text(
widget.temp,
textAlign: TextAlign.center,
overflow: TextOverflow.visible,
style: TextStyle(
color: basePurpleDark,
fontWeight: FontWeight.w800,
// fontSize: 16,
),
),
),
),
],
),
),
SizedBox(
height: getProportionateScreenHeight(480.0),
child: Padding(
padding: const EdgeInsets.all(10.0),
child: ListView.builder(
itemCount: _hrs.length,
itemBuilder: (context, index) {
return DayScheduleCard(
image: "assets/Hotels/d4.png",
details: _details[index],
hrs: _hrs[index],
);
}),
),
),
],
);
}
final List<String> _details = [
'Proceed for Hot Air Balloon Ride (Subject to Weather Condition )',
'Transfer Back to Hotel\n\nBreakfast at Hotel',
'Full Day Cappadocia Sightseeing Tour With 02 Hours Jeep Safari tour\n\nLunch at Uranos Cave Restaurant',
'Transfer Back to Hotel',
'Transfer for Turkish Night Dinner With Entertainment at Evranos Restaurant.\n\nTransfer Back to Hotel\n\nOvernight at Hotel',
];
final List<String> _hrs = [
'0600-0630Hrs',
'0830Hrs',
'1030Hrs',
'1230Hrs',
'2000Hrs',
];
}
| 0 |
mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/days_itenarary | mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/days_itenarary/days_screens/day2.dart | import 'package:flutter/material.dart';
import 'package:phoenix_travel_app/src/core/constants.dart';
import 'package:phoenix_travel_app/src/core/size_config.dart';
import 'package:phoenix_travel_app/src/views/days_itenarary/components/daybox.dart';
class Day2Screen extends StatefulWidget {
final String day;
final String temp;
const Day2Screen({
Key? key,
required this.day,
required this.temp,
}) : super(key: key);
@override
_Day2ScreenState createState() => _Day2ScreenState();
}
class _Day2ScreenState extends State<Day2Screen> {
@override
Widget build(BuildContext context) {
return Column(
children: [
Padding(
padding: const EdgeInsets.all(5.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Card(
child: Padding(
padding: const EdgeInsets.only(
left: 12.0, right: 12.0, top: 8.0, bottom: 8.0),
child: Text(
widget.day,
textAlign: TextAlign.center,
overflow: TextOverflow.visible,
style: TextStyle(
color: basePurpleDark,
fontWeight: FontWeight.w800,
// fontSize: 16,
),
),
),
),
Card(
child: Padding(
padding: const EdgeInsets.only(
left: 12.0, right: 12.0, top: 8.0, bottom: 8.0),
child: Text(
widget.temp,
textAlign: TextAlign.center,
overflow: TextOverflow.visible,
style: TextStyle(
color: basePurpleDark,
fontWeight: FontWeight.w800,
// fontSize: 16,
),
),
),
),
],
),
),
SizedBox(
height: getProportionateScreenHeight(480.0),
child: Padding(
padding: const EdgeInsets.all(10.0),
child: ListView.builder(
itemCount: _hrs.length,
itemBuilder: (context, index) {
return DayScheduleCard(
image: "assets/Hotels/d2.png",
details: _details[index],
hrs: _hrs[index],
);
}),
),
),
],
);
}
final List<String> _details = [
'Breakfast at Hotel\n\nProceed to Bursa City Tour followed by visit to Orhan Ghazi, Usman Ghazi Tomb & Green Mosque.\n\nCable Car Ride to Ulludag Mountai Level-2 (Approx 40 Min Cable Car Ride)',
'Arrival at Cable Car Station & Hot Tea & Coffee Will be Served at Grand Yazici Hotel Hotel\n\nTime free to Explore Snowy mountain and Personal activities',
'Buffet Lunch Will be Served at Grand Yazici Hotel\n\nDrop to Old Silk Market\n\nTransfer Back to Hotel\n\nTime Free For Fresh Up & Personal Activities',
'Transfer for Dinner at Kofteci Yusuf Restaurant\n\nTransfer Back to hotel\n\nOvernight at Hotel ',
// 'Istanbul by TK 711 ISB-IST (47PAX) (RAWALPINDI |PESHAWAR)\n\nMeet & Assist at Airport & Transfer to Bursa by Bus\n\nTransfer to Bursa\n\nEnroute Lunch at Oksijen Outlet Service Center (Lunch at Bursa Kebap Restaurant )',
];
final List<String> _hrs = [
'1000Hrs',
'1200Hrs ',
'1430Hrs',
'2030Hrs ',
// '1035hrs',
];
}
| 0 |
mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/days_itenarary | mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/days_itenarary/days_screens/day8.dart | import 'package:flutter/material.dart';
import 'package:phoenix_travel_app/src/core/constants.dart';
import 'package:phoenix_travel_app/src/core/size_config.dart';
import 'package:phoenix_travel_app/src/views/days_itenarary/components/daybox.dart';
class Day8Screen extends StatefulWidget {
final String day;
final String temp;
const Day8Screen({Key? key,
required this.day,
required this.temp,
}) : super(key: key);
@override
_Day8ScreenState createState() => _Day8ScreenState();
}
class _Day8ScreenState extends State<Day8Screen> {
@override
Widget build(BuildContext context) {
return Column(
children: [
Padding(
padding: const EdgeInsets.all(5.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Card(
child: Padding(
padding: const EdgeInsets.only(
left: 12.0, right: 12.0, top: 8.0, bottom: 8.0),
child: Text(
widget.day,
textAlign: TextAlign.center,
overflow: TextOverflow.visible,
style: TextStyle(
color: basePurpleDark,
fontWeight: FontWeight.w800,
// fontSize: 16,
),
),
),
),
Card(
child: Padding(
padding: const EdgeInsets.only(
left: 12.0, right: 12.0, top: 8.0, bottom: 8.0),
child: Text(
widget.temp,
textAlign: TextAlign.center,
overflow: TextOverflow.visible,
style: TextStyle(
color: basePurpleDark,
fontWeight: FontWeight.w800,
// fontSize: 16,
),
),
),
),
],
),
),
SizedBox(
height: getProportionateScreenHeight(480.0),
child: Padding(
padding: const EdgeInsets.all(10.0),
child: ListView.builder(
itemCount: _hrs.length,
itemBuilder: (context, index) {
return DayScheduleCard(
image: "assets/Hotels/d8.png",
details: _details[index],
hrs: _hrs[index],
);
}),
),
),
],
);
}
final List<String> _details = [
'Breakfast at Hotel\n\nCheck Out From Hotel\n\nVisit Ayub Ansari Mosque\n\nDrop for Shopping Olivium Mall With Lunch Allowance\n\nTransfer to Istanbul Airport As Per Respective Respective Flight ',
'Departure Flight EK 122 IST-DXB (Multan | Faisalabad Group)',
'Departure Flight TK 708 IST-KHI\n\n( Karchi | Hyderabad | Sukkur |Quetaa)',
'Departure Flight TK 710 IST-ISB (Rawalpindi |Peshawar )',
'Departure Flight TK 718 IST-LHE (Lahore | Sahiwal | Gujranwala )',
];
final List<String> _hrs = [
'1000Hrs',
'2005Hrs',
'2050Hrs',
'2125Hrs',
'2235Hrs',
];
}
| 0 |
mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/days_itenarary | mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/days_itenarary/days_screens/day5.dart | import 'package:flutter/material.dart';
import 'package:phoenix_travel_app/src/core/constants.dart';
import 'package:phoenix_travel_app/src/core/size_config.dart';
import 'package:phoenix_travel_app/src/views/days_itenarary/components/daybox.dart';
class Day5Screen extends StatefulWidget {
final String day;
final String temp;
const Day5Screen({Key? key,
required this.day,
required this.temp,
}) : super(key: key);
@override
_Day5ScreenState createState() => _Day5ScreenState();
}
class _Day5ScreenState extends State<Day5Screen> {
@override
Widget build(BuildContext context) {
return Column(
children: [
Padding(
padding: const EdgeInsets.all(5.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Card(
child: Padding(
padding: const EdgeInsets.only(
left: 12.0, right: 12.0, top: 8.0, bottom: 8.0),
child: Text(
widget.day,
textAlign: TextAlign.center,
overflow: TextOverflow.visible,
style: TextStyle(
color: basePurpleDark,
fontWeight: FontWeight.w800,
// fontSize: 16,
),
),
),
),
Card(
child: Padding(
padding: const EdgeInsets.only(
left: 12.0, right: 12.0, top: 8.0, bottom: 8.0),
child: Text(
widget.temp,
textAlign: TextAlign.center,
overflow: TextOverflow.visible,
style: TextStyle(
color: basePurpleDark,
fontWeight: FontWeight.w800,
// fontSize: 16,
),
),
),
),
],
),
),
SizedBox(
height: getProportionateScreenHeight(480.0),
child: Padding(
padding: const EdgeInsets.all(10.0),
child: ListView.builder(
itemCount: _hrs.length,
itemBuilder: (context, index) {
return DayScheduleCard(
image: "assets/Hotels/d5.png",
details: _details[index],
hrs: _hrs[index],
);
}),
),
),
],
);
}
final List<String> _details = [
'Breakfast at Hotel\n\nCheck Out From Hotel\n\nKayseri Orientation Tour\n\nLunch at Kemal Kochak Restaurant Kayseri',
'Departure Flight PC 2737 ASR-IST (Sabiha Airport)',
'Departure Flight TK 2013 ASR-IST',
'Arrival By PC 2737 (Karachi|Hyderabad|Sukkur|Quetta|Rawalpindi|Peshawar)',
'Arrival By TK 2013 ( Lahore |Sahiwal|Multan |Faisalabad)\n\nMeet & Assist at Airport & Transfer to Intercontinental Hotel\n\nCheck Inn Formalities',
'Transfer for Dinner at Alladin Restaurant With Entertainment\n\nTransfer Back to Hotel / Drop at Taksim\n\nOvernight at Hotel',
];
final List<String> _hrs = [
'1100Hrs',
'1610Hrs ',
'1655Hrs',
'1735Hrs',
'1820Hrs',
'2030Hrs',
];
}
| 0 |
mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/days_itenarary | mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/days_itenarary/days_screens/day7.dart | import 'package:flutter/material.dart';
import 'package:phoenix_travel_app/src/core/constants.dart';
import 'package:phoenix_travel_app/src/core/size_config.dart';
import 'package:phoenix_travel_app/src/views/days_itenarary/components/daybox.dart';
class Day7Screen extends StatefulWidget {
final String day;
final String temp;
const Day7Screen({Key? key,
required this.day,
required this.temp,
}) : super(key: key);
@override
_Day7ScreenState createState() => _Day7ScreenState();
}
class _Day7ScreenState extends State<Day7Screen> {
@override
Widget build(BuildContext context) {
return Column(
children: [
Padding(
padding: const EdgeInsets.all(5.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Card(
child: Padding(
padding: const EdgeInsets.only(
left: 12.0, right: 12.0, top: 8.0, bottom: 8.0),
child: Text(
widget.day,
textAlign: TextAlign.center,
overflow: TextOverflow.visible,
style: TextStyle(
color: basePurpleDark,
fontWeight: FontWeight.w800,
// fontSize: 16,
),
),
),
),
Card(
child: Padding(
padding: const EdgeInsets.only(
left: 12.0, right: 12.0, top: 8.0, bottom: 8.0),
child: Text(
widget.temp,
textAlign: TextAlign.center,
overflow: TextOverflow.visible,
style: TextStyle(
color: basePurpleDark,
fontWeight: FontWeight.w800,
// fontSize: 16,
),
),
),
),
],
),
),
SizedBox(
height: getProportionateScreenHeight(480.0),
child: Padding(
padding: const EdgeInsets.all(10.0),
child: ListView.builder(
itemCount: _hrs.length,
itemBuilder: (context, index) {
return DayScheduleCard(
image: "assets/Hotels/d7.png",
details: _details[index],
hrs: _hrs[index],
);
}),
),
),
],
);
}
final List<String> _details = [
'Breakfast at Hotel',
'Day Free For Shopping & Personal activities With Lunch Allowance',
'Transfer to Pier For Bosphorus Dinner Cruise',
'Bosphorus Dinner Cruise With Entertainment\n\nTransfer Back to Hotel',
];
final List<String> _hrs = [
'0830Hrs',
'1030Hrs',
'2000Hrs',
'2030-2330Hrs',
];
}
| 0 |
mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/days_itenarary | mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/days_itenarary/days_screens/day6.dart | import 'package:flutter/material.dart';
import 'package:phoenix_travel_app/src/core/constants.dart';
import 'package:phoenix_travel_app/src/core/size_config.dart';
import 'package:phoenix_travel_app/src/views/days_itenarary/components/daybox.dart';
class Day6Screen extends StatefulWidget {
final String day;
final String temp;
const Day6Screen({Key? key,
required this.day,
required this.temp,
}) : super(key: key);
@override
_Day6ScreenState createState() => _Day6ScreenState();
}
class _Day6ScreenState extends State<Day6Screen> {
@override
Widget build(BuildContext context) {
return Column(
children: [
Padding(
padding: const EdgeInsets.all(5.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Card(
child: Padding(
padding: const EdgeInsets.only(
left: 12.0, right: 12.0, top: 8.0, bottom: 8.0),
child: Text(
widget.day,
textAlign: TextAlign.center,
overflow: TextOverflow.visible,
style: TextStyle(
color: basePurpleDark,
fontWeight: FontWeight.w800,
// fontSize: 16,
),
),
),
),
Card(
child: Padding(
padding: const EdgeInsets.only(
left: 12.0, right: 12.0, top: 8.0, bottom: 8.0),
child: Text(
widget.temp,
textAlign: TextAlign.center,
overflow: TextOverflow.visible,
style: TextStyle(
color: basePurpleDark,
fontWeight: FontWeight.w800,
// fontSize: 16,
),
),
),
),
],
),
),
SizedBox(
height: getProportionateScreenHeight(480.0),
child: Padding(
padding: const EdgeInsets.all(10.0),
child: ListView.builder(
itemCount: _hrs.length,
itemBuilder: (context, index) {
return DayScheduleCard(
image: "assets/Hotels/d6.png",
details: _details[index],
hrs: _hrs[index],
);
}),
),
),
],
);
}
final List<String> _details = [
'Breakfast at Hotel',
'Transfer to Sogut\n\nVisit the Famous Ertugul Ghazi Tomb & Mosque & Adabali tomb & Turgut tomb & Inegol City & Bilecik City ',
// 'Tranfer Sogut city visit Ertugrul ghazi Tomb and Mosque',
'Lunch at Sofrasi Restaurant',
// 'Transfer Back to Istanbul',
'Adabali tomb & Turgut tomb & Inegol City & Bilecik City ',
'Transfer at Istanbul',
'Arrival at Istanbul\n\nEvening Transfer for Shopping With Dinner Allowance\n\nOvernight at Hotel ',
];
final List<String> _hrs = [
'0700Hrs',
'0900Hrs',
// '1000Hrs',
'1300Hrs',
// '1500Hrs',
'1400Hrs',
'1700Hrs',
'1900Hrs',
];
}
| 0 |
mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views | mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/hotels/hotels_screen.dart | import 'package:flutter/material.dart';
import 'package:phoenix_travel_app/src/core/constants.dart';
import 'package:phoenix_travel_app/src/core/size_config.dart';
import 'package:phoenix_travel_app/src/views/hotels/components/hotels_card.dart';
class HotelsScreen extends StatefulWidget {
const HotelsScreen({Key? key}) : super(key: key);
@override
_HotelsScreenState createState() => _HotelsScreenState();
}
class _HotelsScreenState extends State<HotelsScreen> {
@override
Widget build(BuildContext context) {
SizeConfig().init(context);
return SafeArea(
child: Scaffold(
body: Column(
children: [
Container(
height: 80,
width: getProportionateScreenWidth(375.0),
decoration: BoxDecoration(
borderRadius: const BorderRadius.only(
bottomRight: Radius.circular(40.0),
bottomLeft: Radius.circular(40.0),
),
gradient: LinearGradient(
begin: Alignment.bottomCenter,
end: Alignment.topCenter,
colors: [
baseBlackPure,
basePurpleDark,
],
),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Padding(
padding: const EdgeInsets.only(left: 10.0, right: 20.0),
child: Icon(
Icons.arrow_back_rounded,
size: 30,
color: baseWhitePlain,
),
),
),
Text(
"Hotels",
textAlign: TextAlign.center,
style: TextStyle(
fontWeight: FontWeight.bold,
color: baseWhitePlain,
fontSize: 24,
),
),
],
),
),
/// center
Expanded(
child: Padding(
padding: const EdgeInsets.all(10.0),
child: ListView.builder(
itemCount: 4,
itemBuilder: (context, index) {
return HotelDetailsCard(
image: _images[index],
phoneNumber: _phoneNumber[index],
address: _address[index],
hotelName: _hotelName[index],
dateRange: _dateRange[index],
);
}),
),
),
],
),
bottomNavigationBar: Container(
color: baseWhitePlain,
width: getProportionateScreenWidth(375.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
SizedBox(
width: getProportionateScreenWidth(120.0),
child: Image.asset(
"assets/logo.png",
),
),
SizedBox(
width: getProportionateScreenWidth(120.0),
child: Image.asset(
"assets/bottom_icn.png",
),
),
],
),
),
),
);
}
final List<String> _images = [
'assets/Hotels/bursa.png',
'assets/Hotels/movenpick.png',
'assets/Hotels/cappada.png',
'assets/Hotels/interconti.png',
];
final List<String> _hotelName = [
'Bursa Almirah Hotel',
'Bursa Movenpick Hotel',
'Cappadocia Double Tree by Hilton Avanos',
'Intercontinental Istanbul',
];
final List<String> _address = [
'Santral Garaj, Ulubatlı Hasan Blv.No:5, 16200 Osmangazi/Bursa, Turkey',
'Çekirge, Çekirge Cd. No:81, 16104 Osmangazi/Bursa, Turkey',
'Yeni, Kızılırmak Cd. No:1, 50500 Avanos/Nevşehir, Turkey',
'Gümüşsuyu, Asker Ocağı Cd. No. 1, 34435 Beyoğlu/İstanbul, Turkey',
];
final List<String> _phoneNumber = [
'+90 224 250 20 20',
'+90 224 230 01 00',
'+90 384 511 11 11',
'+90 212 368 44 44',
];
final List<String> _dateRange = [
'BURSA (21 - 23 Feb)',
'',
'CAPPADOCIA (23 - 25 Feb)',
'ISTANBUL (25 - 28 Feb)',
];
}
| 0 |
mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/hotels | mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/hotels/components/hotels_card.dart | import 'package:flutter/material.dart';
import 'package:phoenix_travel_app/src/core/constants.dart';
class HotelDetailsCard extends StatelessWidget {
final String image;
final String hotelName;
final String phoneNumber;
final String address;
final String dateRange;
const HotelDetailsCard({
Key? key,
required this.image,
required this.phoneNumber,
required this.address,
required this.hotelName,
required this.dateRange,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return SizedBox(
// height: 150.0,
// width: getProportionateScreenWidth(340.0),
child: Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15.0),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 100,
// height: 100,
decoration:
BoxDecoration(borderRadius: BorderRadius.circular(15.0)),
padding: const EdgeInsets.all(5.0),
child: Image.asset(image),
),
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
// textDirection: TextDirection.ltr,
mainAxisSize: MainAxisSize.min,
// textBaseline: TextBaseline.alphabetic,
children: [
/// dateRange
Flexible(
child: Text(
dateRange,
// textAlign: TextAlign.center,
overflow: TextOverflow.visible,
style: TextStyle(
fontWeight: FontWeight.bold,
color: basePurpleDark,
// fontSize: 16,
),
),
),
Text(
hotelName,
// textAlign: TextAlign.center,
style: TextStyle(
fontWeight: FontWeight.bold,
color: basePurpleDark,
fontSize: 20,
),
),
const SizedBox(height: 10),
/// address
Flexible(
child: Text(
'Address : ' + address + '\n',
// textAlign: TextAlign.center,
overflow: TextOverflow.visible,
style: TextStyle(
fontWeight: FontWeight.bold,
color: basePurpleDark,
// fontSize: 16,
),
),
),
// const SizedBox(height: 5),
/// phoneNumber
Flexible(
child: Text(
'Phone : ' + phoneNumber + '\n',
// textAlign: TextAlign.center,
overflow: TextOverflow.visible,
style: TextStyle(
fontWeight: FontWeight.bold,
color: basePurpleDark,
// fontSize: 16,
),
),
),
// const SizedBox(height: 5),
],
),
),
),
],
),
),
);
}
}
| 0 |
mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views | mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/onboarding/onboarding_screen.dart | import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/painting.dart';
import 'package:phoenix_travel_app/src/core/constants.dart';
import 'package:phoenix_travel_app/src/core/size_config.dart';
import 'package:phoenix_travel_app/src/views/dialog_box/alertbox.dart';
import 'package:phoenix_travel_app/src/views/onboarding/components/escort_box.dart';
import 'package:phoenix_travel_app/src/views/onboarding/components/flight_box.dart';
import 'package:phoenix_travel_app/src/views/onboarding/components/hotels_box.dart';
import 'package:phoenix_travel_app/src/views/onboarding/components/itenarary_box.dart';
import 'package:phoenix_travel_app/src/views/onboarding/components/travel_guide_box.dart';
class OnboardScreen extends StatefulWidget {
const OnboardScreen({Key? key}) : super(key: key);
@override
_OnboardScreenState createState() => _OnboardScreenState();
}
class _OnboardScreenState extends State<OnboardScreen> {
@override
void initState() {
Future.delayed(const Duration(seconds: 2), () {
showDialog(
context: context,
builder: (BuildContext context) {
return const CustomDialogBox(
img: 'assets/dialog.jpeg',
);
});
}); super.initState();
}
@override
Widget build(BuildContext context) {
SizeConfig().init(context);
return Scaffold(
body: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
height: 180,
width: getProportionateScreenWidth(375.0),
decoration: BoxDecoration(
borderRadius: const BorderRadius.only(
bottomRight: Radius.circular(100.0),
bottomLeft: Radius.circular(100.0),
),
gradient: LinearGradient(
begin: Alignment.bottomCenter,
end: Alignment.topCenter,
colors: [
baseBlackPure,
basePurpleDark,
],
),
),
child: Center(
child: Text(
"Welcome to Turkey",
textAlign: TextAlign.center,
style: TextStyle(
fontWeight: FontWeight.bold,
color: baseWhitePlain,
fontSize: 28,
),
),
),
),
SizedBox(height: getProportionateScreenHeight(10.0)),
Text(
"Esteemed sales partners, we welcome you to the memorable Turkey trip",
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.subtitle2,
),
Expanded(
child: Padding(
padding: const EdgeInsets.all(10.0),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
/// Itenarary Box
const ItenararyBox(),
/// 4 Boxes
SizedBox(
width: getProportionateScreenWidth(300.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
/// Flight and Escort Box
Column(
children: const [
EscortBox(),
FlightBox(),
],
),
/// Hotel and Travel Box
Column(
children: const [
HotelsBox(),
TravelGuideBox(),
],
),
],
),
),
],
),
),
),
),
],
),
bottomNavigationBar: Container(
color: baseWhitePlain,
width: getProportionateScreenWidth(375.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
SizedBox(
width: getProportionateScreenWidth(120.0),
child: Image.asset(
"assets/logo.png",
),
),
SizedBox(
width: getProportionateScreenWidth(120.0),
child: Image.asset(
"assets/bottom_icn.png",
),
),
],
),
),
);
}
}
| 0 |
mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/onboarding | mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/onboarding/components/travel_guide_box.dart | import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:phoenix_travel_app/src/core/size_config.dart';
import 'package:phoenix_travel_app/src/views/travel_guide/travel_guide.dart';
class TravelGuideBox extends StatelessWidget {
const TravelGuideBox({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
SizeConfig().init(context);
return GestureDetector(
onTap: (){
Navigator.push(context, CupertinoPageRoute(builder: (_) => const TravelGuideScreen()));
},
child: SizedBox(
width: getProportionateScreenWidth(145.0),
child: Stack(
children: [
Image.asset("assets/dashboard/tg_img.png"),
Image.asset(
"assets/dashboard/travel_guide_filter.png",
color: Colors.white.withOpacity(0.8),
colorBlendMode: BlendMode.modulate,
),
Positioned(
left: 1,
right: 1,
bottom: 1,
top: 1,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Image.asset(
"assets/dashboard/tg_icn.png",
scale: 1.2,
),
Image.asset(
"assets/dashboard/Travel Guide.png",
scale: 1.2,
),
],
),
),
],
),
),
);
}
}
| 0 |
mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/onboarding | mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/onboarding/components/hotels_box.dart | import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:phoenix_travel_app/src/core/size_config.dart';
import 'package:phoenix_travel_app/src/views/hotels/hotels_screen.dart';
class HotelsBox extends StatelessWidget {
const HotelsBox({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
SizeConfig().init(context);
return GestureDetector(
onTap: (){
Navigator.push(context, CupertinoPageRoute(builder: (_) => const HotelsScreen()));
},
child: SizedBox(
width: getProportionateScreenWidth(145.0),
child: Stack(
children: [
Image.asset(
"assets/dashboard/hotels_img.png"),
Image.asset(
"assets/dashboard/hotels_filter.png",
color: Colors.white.withOpacity(0.8),
colorBlendMode: BlendMode.modulate,
),
Positioned(
left: 1,
right: 1,
bottom: 1,
top: 1,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Image.asset(
"assets/dashboard/hotels_icn.png",
scale: 1.2,
),
Image.asset(
"assets/dashboard/Hotels.png",
scale: 1.2,
),
],
),
),
],
),
),
);
}
}
| 0 |
mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/onboarding | mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/onboarding/components/flight_box.dart | import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:phoenix_travel_app/src/core/size_config.dart';
import 'package:phoenix_travel_app/src/views/flight/flight_details.dart';
class FlightBox extends StatelessWidget {
const FlightBox({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
SizeConfig().init(context);
return GestureDetector(
onTap: (){
Navigator.push(context, CupertinoPageRoute(builder: (_) => const FlightDetailsScreen()));
},
child: SizedBox(
width: getProportionateScreenWidth(145.0),
child: Stack(
children: [
Image.asset(
"assets/dashboard/flight_img.png"),
Image.asset(
"assets/dashboard/flight_filter.png",
color: Colors.white.withOpacity(0.8),
colorBlendMode: BlendMode.modulate,
),
Positioned(
left: 1,
right: 1,
bottom: 1,
top: 1,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Image.asset(
"assets/dashboard/flight_icn.png",
scale: 1.2,
),
Image.asset(
"assets/dashboard/Flight Details.png",
scale: 1.2,
),
],
),
),
],
),
),
);
}
}
| 0 |
mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/onboarding | mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/onboarding/components/itenarary_box.dart | import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:phoenix_travel_app/src/core/size_config.dart';
import 'package:phoenix_travel_app/src/views/days_itenarary/itenarary.dart';
class ItenararyBox extends StatelessWidget {
const ItenararyBox({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
SizeConfig().init(context);
return GestureDetector(
onTap: (){
Navigator.push(context, CupertinoPageRoute(builder: (_) => const ItenararyScreen()));
},
child: SizedBox(
width: getProportionateScreenWidth(300.0),
child: Stack(
children: [
Image.asset("assets/dashboard/iten_img.png"),
Image.asset(
"assets/dashboard/iten_filter.png",
color: Colors.white.withOpacity(0.6),
colorBlendMode: BlendMode.modulate,
),
Positioned(
left: 1,
right: 1,
bottom: 1,
top: 1,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
"assets/dashboard/Itenarary_img.png",
scale: 1.2,
),
Image.asset(
"assets/dashboard/Itinerary.png",
scale: 1.2,
),
],
),
),
],
),
),
);
}
}
| 0 |
mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/onboarding | mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/onboarding/components/escort_box.dart | import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:phoenix_travel_app/src/core/size_config.dart';
import 'package:phoenix_travel_app/src/views/tour_escort/escort_screen.dart';
class EscortBox extends StatelessWidget {
const EscortBox({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
SizeConfig().init(context);
return GestureDetector(
onTap: (){
Navigator.push(context, CupertinoPageRoute(builder: (_) => const TourEscortScreen()));
},
child: SizedBox(
width: getProportionateScreenWidth(145.0),
child: Stack(
children: [
Image.asset(
"assets/dashboard/escort_img.png"),
Image.asset(
"assets/dashboard/escort_filter.png",
color: Colors.white.withOpacity(0.8),
colorBlendMode: BlendMode.modulate,
),
Positioned(
left: 1,
right: 1,
bottom: 1,
top: 1,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Image.asset(
"assets/dashboard/t_escort.png",
scale: 1.2,
),
Image.asset(
"assets/dashboard/Tour Escorts.png",
scale: 1.2,
),
],
),
),
],
),
),
);
}
}
| 0 |
mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views | mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/tour_escort/escort_screen.dart | import 'package:flutter/material.dart';
import 'package:phoenix_travel_app/src/core/constants.dart';
import 'package:phoenix_travel_app/src/core/size_config.dart';
import 'package:phoenix_travel_app/src/views/tour_escort/components/escort_card.dart';
class TourEscortScreen extends StatefulWidget {
const TourEscortScreen({Key? key}) : super(key: key);
@override
_TourEscortScreenState createState() => _TourEscortScreenState();
}
class _TourEscortScreenState extends State<TourEscortScreen> {
@override
Widget build(BuildContext context) {
SizeConfig().init(context);
return SafeArea(
child: Scaffold(
body: Column(
children: [
Container(
height: 80,
width: getProportionateScreenWidth(375.0),
decoration: BoxDecoration(
borderRadius: const BorderRadius.only(
bottomRight: Radius.circular(40.0),
bottomLeft: Radius.circular(40.0),
),
gradient: LinearGradient(
begin: Alignment.bottomCenter,
end: Alignment.topCenter,
colors: [
baseBlackPure,
basePurpleDark,
],
),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Padding(
padding: const EdgeInsets.only(left: 10.0, right: 20.0),
child: Icon(
Icons.arrow_back_rounded,
size: 30,
color: baseWhitePlain,
),
),
),
Text(
"Tour Escorts",
textAlign: TextAlign.center,
style: TextStyle(
fontWeight: FontWeight.bold,
color: baseWhitePlain,
fontSize: 24,
),
),
],
),
),
/// center
Expanded(
child: Padding(
padding: const EdgeInsets.all(10.0),
child: ListView.builder(
itemCount: 4,
itemBuilder: (context, index) {
return EscortPersonDetailsCard(
airline: _airline[index],
deptCity: _deptCity[index],
pakContact: _pakContact[index],
turkishContact: _turkishContact[index],
image: _images[index],
personName: _names[index],
);
}),
),
),
],
),
bottomNavigationBar: Container(
color: baseWhitePlain,
width: getProportionateScreenWidth(375.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
SizedBox(
width: getProportionateScreenWidth(120.0),
child: Image.asset(
"assets/logo.png",
),
),
SizedBox(
width: getProportionateScreenWidth(120.0),
child: Image.asset(
"assets/bottom_icn.png",
),
),
],
),
),
),
);
}
final List<String> _images = [
'assets/Tour Escorts/anwar.png',
'assets/Tour Escorts/farhad.png',
'assets/Tour Escorts/waqas.png',
'assets/Tour Escorts/adnan.png',
];
final List<String> _names = [
'Anwar Jahangir',
'Farhad Ahmed',
'Waqas Ahmed',
'Adnan Ahmed',
];
final List<String> _airline = [
'Turkish Airline',
'Turkish Airline',
'Turkish Airline',
'Emirates Airline',
];
final List<String> _deptCity = [
'Karachi',
'Islamabad City',
'Lahore City',
'Lahore City',
];
final List<String> _pakContact = [
'+92-333-3358351 / +66-81-8550244',
'+92-305-6719786',
'+92-312-1161432',
'+92-300-2506171',
];
final List<String> _turkishContact = [
'+90 552 604 29 13',
'+90 552 735 29 13',
'+90 552 671 29 13',
'+90 552 158 29 13',
];
}
| 0 |
mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/tour_escort | mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/tour_escort/components/escort_card.dart | import 'package:flutter/material.dart';
import 'package:phoenix_travel_app/src/core/constants.dart';
import 'package:phoenix_travel_app/src/core/size_config.dart';
class EscortPersonDetailsCard extends StatelessWidget {
final String image;
final String personName;
final String airline;
final String deptCity;
final String pakContact;
final String turkishContact;
const EscortPersonDetailsCard(
{Key? key,
required this.image,
required this.personName,
required this.airline,
required this.deptCity,
required this.pakContact,
required this.turkishContact})
: super(key: key);
@override
Widget build(BuildContext context) {
return SizedBox(
// height: 150.0,
// width: getProportionateScreenWidth(340.0),
child: Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15.0),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 100,
// height: 100,
decoration:
BoxDecoration(borderRadius: BorderRadius.circular(15.0)),
padding: const EdgeInsets.all(5.0),
child: Image.asset(image),
),
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
// textDirection: TextDirection.ltr,
mainAxisSize: MainAxisSize.min,
// textBaseline: TextBaseline.alphabetic,
children: [
Text(
personName,
// textAlign: TextAlign.center,
style: TextStyle(
fontWeight: FontWeight.bold,
color: basePurpleDark,
fontSize: 20,
),
),
const SizedBox(height: 10),
/// airline
Flexible(
child: Text(
'Airline : ' + airline + '\n',
// textAlign: TextAlign.center,
overflow: TextOverflow.visible,
style: TextStyle(
fontWeight: FontWeight.bold,
color: basePurpleDark,
// fontSize: 16,
),
),
),
// const SizedBox(height: 5),
/// deptCity
Flexible(
child: Text(
'Departure City : ' + deptCity + '\n',
// textAlign: TextAlign.center,
overflow: TextOverflow.visible,
style: TextStyle(
fontWeight: FontWeight.bold,
color: basePurpleDark,
// fontSize: 16,
),
),
),
// const SizedBox(height: 5),
/// pakContact
Text(
'Pak Contact : ' + pakContact + '\n',
// textAlign: TextAlign.center,
overflow: TextOverflow.visible,
style: TextStyle(
fontWeight: FontWeight.bold,
color: basePurpleDark,
// fontSize: 16,
),
),
// const SizedBox(height: 5),
/// turkishContact
Flexible(
child: Text(
'Turkish Contact : ' + turkishContact + '\n',
// textAlign: TextAlign.center,
overflow: TextOverflow.visible,
style: TextStyle(
fontWeight: FontWeight.bold,
color: basePurpleDark,
// fontSize: 16,
),
),
),
// const SizedBox(height: 10),
],
),
),
),
],
),
),
);
}
}
| 0 |
mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views | mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/splash/splash_screen.dart | import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:phoenix_travel_app/src/core/constants.dart';
import 'package:phoenix_travel_app/src/core/size_config.dart';
import 'package:phoenix_travel_app/src/views/onboarding/onboarding_screen.dart';
class SplashScreen extends StatefulWidget {
const SplashScreen({Key? key, required this.title}) : super(key: key);
final String title;
@override
State<SplashScreen> createState() => _SplashScreenState();
}
class _SplashScreenState extends State<SplashScreen> {
@override
void initState() {
Future.delayed(const Duration(seconds: 2), () {
Navigator.pushReplacement(
context, CupertinoPageRoute(builder: (_) => const OnboardScreen()));
});
super.initState();
}
@override
Widget build(BuildContext context) {
SizeConfig().init(context);
return Scaffold(
body: SafeArea(
child: SizedBox(
width: getProportionateScreenWidth(375.0),
// height: getProportionateScreenHeight(812.0),
child: Image.asset(
"assets/Splash Screen.png",
fit: BoxFit.cover,
),
),
),
);
}
}
| 0 |
mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views | mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/travel_guide/travel_guide.dart | import 'package:flutter/material.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
import 'package:phoenix_travel_app/src/core/constants.dart';
import 'package:phoenix_travel_app/src/core/size_config.dart';
class TravelGuideScreen extends StatefulWidget {
const TravelGuideScreen({Key? key}) : super(key: key);
@override
State<TravelGuideScreen> createState() => _TravelGuideScreenState();
}
class _TravelGuideScreenState extends State<TravelGuideScreen> {
@override
Widget build(BuildContext context) {
SizeConfig().init(context);
return SafeArea(
child: Scaffold(
body: Column(
children: [
Container(
height: 80,
width: getProportionateScreenWidth(375.0),
decoration: BoxDecoration(
borderRadius: const BorderRadius.only(
bottomRight: Radius.circular(40.0),
bottomLeft: Radius.circular(40.0),
),
gradient: LinearGradient(
begin: Alignment.bottomCenter,
end: Alignment.topCenter,
colors: [
baseBlackPure,
basePurpleDark,
],
),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Padding(
padding: const EdgeInsets.only(left: 10.0, right: 20.0),
child: Icon(
Icons.arrow_back_rounded,
size: 30,
color: baseWhitePlain,
),
),
),
Text(
"Travel Guide",
textAlign: TextAlign.center,
style: TextStyle(
fontWeight: FontWeight.bold,
color: baseWhitePlain,
fontSize: 24,
),
),
],
),
),
const Expanded(
child: Padding(
padding: EdgeInsets.all(10.0),
child: Markdown(data: _markdownData),
),
),
],
),
bottomNavigationBar: Container(
color: baseWhitePlain,
width: getProportionateScreenWidth(375.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
SizedBox(
width: getProportionateScreenWidth(120.0),
child: Image.asset(
"assets/logo.png",
),
),
SizedBox(
width: getProportionateScreenWidth(120.0),
child: Image.asset(
"assets/bottom_icn.png",
),
),
],
),
),
),
);
}
static const String _markdownData = """
- Please keep COVID Vaccination Card / PCR Test Report with you, in order to show at the airports on Departure / Arrival
- Passports must be kept in the safe box in the hotel’s rooms. There is no need to carry the passports during the tours
- Please keep the hotel visiting card / address details handy, when you go out from the hotel
- Avoid carrying valuables during tours and shopping outings
- At all airports across Pakistan, the limit for the currency being carried is PKR 3,000/-. The value of any foreign currency being carried should not exceed USD 10,000/-
- Baggage Allowance (Economy Class):
Check-in Baggage: 30 Kg (for International Flight) / 25 Kg (Domestic Flight)
Hand Baggage: 7 Kg
- Medicines need to be carried with a proper doctor’s prescription (for both Hand-Carry and Check-In luggage)
- If you are carrying Liquids in your hand carry, please ensure that the container hold no more than 100ml
- Carrying Cigarette Lighters in your hand carry or check-in baggage, is strictly prohibited
- Keep Warm Clothes (Jacket/Gloves/Socks)
- Please ensure that you carry the necessary travel adapters and plugs for your charging devices
- Currency can be exchanged from local money changer in Turkey.
Current Exchange Rate:
EUR to Turkish LIRA: 15.53
USD to Turkish LIRA: 13.64
""";
}
| 0 |
mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views | mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/dialog_box/alertbox.dart | // ignore_for_file: deprecated_member_use
import 'dart:ui';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class CustomDialogBox extends StatefulWidget {
final String? img;
const CustomDialogBox({
Key? key,
this.img,
}) : super(key: key);
@override
_CustomDialogBoxState createState() => _CustomDialogBoxState();
}
class _CustomDialogBoxState extends State<CustomDialogBox> {
@override
Widget build(BuildContext context) {
return Dialog(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(Constants.padding),
),
elevation: 0,
backgroundColor: Colors.white,
child: contentBox(context),
);
}
contentBox(context) {
return Column(
mainAxisSize: MainAxisSize.min,
children: [
Center(
child: Image.asset(
widget.img.toString(),
scale: 1.2,
),
),
Align(
alignment: Alignment.center,
child: TextButton(
onPressed: (){
Navigator.of(context).pop();
},
child: const Text('Close'),
),
),
],
);
}
}
class Constants {
Constants._();
static const double padding = 20;
static const double avatarRadius = 45;
}
| 0 |
mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views | mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/flight/flight_details.dart | import 'package:flutter/material.dart';
import 'package:phoenix_travel_app/src/core/constants.dart';
import 'package:phoenix_travel_app/src/core/size_config.dart';
import 'package:phoenix_travel_app/src/views/flight/components/flight_details_card.dart';
class FlightDetailsScreen extends StatefulWidget {
const FlightDetailsScreen({Key? key}) : super(key: key);
@override
_FlightDetailsScreenState createState() => _FlightDetailsScreenState();
}
class _FlightDetailsScreenState extends State<FlightDetailsScreen> {
@override
Widget build(BuildContext context) {
SizeConfig().init(context);
return SafeArea(
child: Scaffold(
body: Column(
children: [
Container(
height: 80,
width: getProportionateScreenWidth(375.0),
decoration: BoxDecoration(
borderRadius: const BorderRadius.only(
bottomRight: Radius.circular(40.0),
bottomLeft: Radius.circular(40.0),
),
gradient: LinearGradient(
begin: Alignment.bottomCenter,
end: Alignment.topCenter,
colors: [
baseBlackPure,
basePurpleDark,
],
),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Padding(
padding: const EdgeInsets.only(left: 10.0, right: 20.0),
child: Icon(
Icons.arrow_back_rounded,
size: 30,
color: baseWhitePlain,
),
),
),
Text(
"Flight Details",
textAlign: TextAlign.center,
style: TextStyle(
fontWeight: FontWeight.bold,
color: baseWhitePlain,
fontSize: 28,
),
),
],
),
),
/// center
Expanded(
child: Padding(
padding: const EdgeInsets.all(10.0),
child: ListView.builder(
itemCount: _exGroup.length,
itemBuilder: (context, index) {
return FlightDetailsCard(
exGroup: _exGroup[index],
airline: _airline[index],
cities: _cities[index],
c1: _c1[index],
c2: _c2[index],
c3: _c3[index],
c4: _c4[index],
);
}),
),
),
],
),
bottomNavigationBar: Container(
color: baseWhitePlain,
width: getProportionateScreenWidth(375.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
SizedBox(
width: getProportionateScreenWidth(120.0),
child: Image.asset(
"assets/logo.png",
),
),
SizedBox(
width: getProportionateScreenWidth(120.0),
child: Image.asset(
"assets/bottom_icn.png",
),
),
],
),
),
),
);
}
final List<String> _exGroup = [
'Ex-Karachi',
'Ex-Islamabad',
'Ex-Lahore',
'Faislabad Group',
'Multan Group',
];
final List<String> _cities = [
'Karachi/Hyderabad/Sukkur/Quetta',
'Rawalpindi/Peshawar',
'Sahiwal/Gujranwala/Lahore',
'(Departure from Lahore/Return to Faisalabad)',
'(Departure from Lahore/Return to Multan)',
];
final List<String> _airline = [
'TURKISH AIRLINE',
'TURKISH AIRLINE',
'TURKISH AIRLINE',
'EMIRATES AIRLINE',
'EMIRATES AIRLINE',
];
final List<String> _c1 = [
'TK 709 \nPC 2738\nPC 2737\nTK 708',
'TK 711 \nPC 2738\nPC 2737\nTK 710',
'TK 715 \nTK 2012\nTK 2013\nTK 718',
'EK 623\nEK 123\nTK 2012\nTK 2013\nEK 122\nEK 122',
'EK 623\nEK 123\nTK 2012\nTK 2013\nEK 122\nEK 2102',
];
final List<String> _c2 = [
'21 FEB \n23 FEB\n25 FEB\n28 FEB',
'21 FEB \n23 FEB\n25 FEB\n28 FEB',
'21 FEB \n23 FEB\n25 FEB\n28 FEB',
'21 FEB \n21 FEB\n23 FEB\n25 FEB\n28 FEB\n01 MAR',
'21 FEB \n21 FEB\n23 FEB\n25 FEB\n28 FEB\n01 MAR',
];
final List<String> _c3 = [
'KHI IST \nSAW ASR\nASR SAW\nIST KHI ',
'ISB IST\nSAW ASR\nASR SAW\nIST ISB',
'LHE IST\nIST ASR\nASR IST\nIST LHE ',
'LHE DXB\nDXB IST\nIST ASR \nASR IST \nIST DXB\nDXB LYP ',
'LHE DXB\nDXB IST\nIST ASR \nASR IST \nIST DXB\nDXB MUX ',
];
final List<String> _c4 = [
'0715 1120 \n1825 1945\n1610 1735\n2050 0405 ',
'0635 1035\n1825 1945\n1610 1735\n2125 0455',
'0800 1220\n1445 1605\n1655 1820\n2235 0605',
'0320 0550 \n1015 1425\n1445 1605\n1655 1820\n2005 0120\n0710 1100 ',
'0320 0550 \n1015 1425\n1445 1605\n1655 1820\n2005 0120\n0600 0935 ',
];
}
| 0 |
mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/flight | mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/views/flight/components/flight_details_card.dart | import 'package:flutter/material.dart';
import 'package:phoenix_travel_app/src/core/constants.dart';
import 'package:phoenix_travel_app/src/core/size_config.dart';
class FlightDetailsCard extends StatelessWidget {
final String exGroup;
final String cities;
final String airline;
final String c1;
final String c2;
final String c3;
final String c4;
const FlightDetailsCard({
Key? key,
required this.exGroup,
required this.airline,
required this.cities,
required this.c1,
required this.c2,
required this.c3,
required this.c4,
}) : super(key: key);
@override
Widget build(BuildContext context) {
SizeConfig().init(context);
return SizedBox(
// height: 150.0,
// width: getProportionateScreenWidth(340.0),
child: Card(
elevation: 5,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
/// exGroup
Text(
exGroup,
// textAlign: TextAlign.center,
style: TextStyle(
fontWeight: FontWeight.bold,
color: basePurpleDark,
fontSize: 24,
),
),
const SizedBox(height: 10),
/// cities
Flexible(
child: Text(
cities,
// textAlign: TextAlign.center,
overflow: TextOverflow.visible,
style: TextStyle(
fontWeight: FontWeight.bold,
color: basePurpleDark,
// fontSize: 16,
),
),
),
const SizedBox(height: 10),
/// Todo: flights schedule
SizedBox(
// width: getProportionateScreenWidth(60.0),
child: Row(
children: [
SizedBox(
width: getProportionateScreenWidth(80.0),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(
c1,
overflow: TextOverflow.visible,
style: TextStyle(
fontWeight: FontWeight.bold,
color: basePurpleDark,
// fontSize: 16,
),
),
],
),
),
SizedBox(
width: getProportionateScreenWidth(80.0),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(
c2,
// textAlign: TextAlign.center,
overflow: TextOverflow.visible,
style: TextStyle(
fontWeight: FontWeight.bold,
color: basePurpleDark,
// fontSize: 16,
),
),
],
),
),
SizedBox(
width: getProportionateScreenWidth(80.0),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(
c3,
// textAlign: TextAlign.center,
overflow: TextOverflow.visible,
style: TextStyle(
fontWeight: FontWeight.bold,
color: basePurpleDark,
// fontSize: 16,
),
),
],
),
),
SizedBox(
width: getProportionateScreenWidth(80.0),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(
c4,
// textAlign: TextAlign.center,
overflow: TextOverflow.visible,
style: TextStyle(
fontWeight: FontWeight.bold,
color: basePurpleDark,
// fontSize: 16,
),
),
],
),
),
],
),
),
const SizedBox(height: 10),
Align(
alignment: Alignment.bottomCenter,
child: Container(
padding: const EdgeInsets.all(6.0),
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: basePurpleDark,
),
child: Text(
airline,
style: TextStyle(color: baseWhitePlain),
textAlign: TextAlign.center,
),
),
),
// const SizedBox(height: 5),
],
),
),
),
);
}
}
| 0 |
mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src | mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/core/constants.dart | import 'package:flutter/material.dart';
///
///
/// App Colors is defined here
///
///
Color baseRed = const Color.fromRGBO(216, 7, 6, 1);
Color basePink = const Color.fromRGBO(252, 146, 164, 1);
Color basePurpleDark = const Color.fromRGBO(132, 59, 144, 1);
Color baseWhitePlain = const Color.fromRGBO(255,255, 255, 1);
Color baseTextGrey = const Color.fromRGBO(108, 108, 108, 1);
Color baseShimmerGrey = const Color.fromRGBO(191, 191, 191, 1);
Color baseBlackPure = const Color.fromRGBO(0, 0, 0, 1);
| 0 |
mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src | mirrored_repositories/Phoenix-Travel-Turkey-App/lib/src/core/size_config.dart | import 'package:flutter/material.dart';
class SizeConfig {
static MediaQueryData? _mediaQueryData;
static double? screenWidth;
static double? screenHeight;
static double? defaultSize;
static Orientation? orientation;
void init(BuildContext context) {
_mediaQueryData = MediaQuery.of(context);
screenWidth = _mediaQueryData!.size.width;
screenHeight = _mediaQueryData!.size.height;
orientation = _mediaQueryData!.orientation;
}
}
// Get the proportionate height as per screen size
double getProportionateScreenHeight(double inputHeight) {
double? screenHeight = SizeConfig.screenHeight;
// 812 is the layout height that designer use
return (inputHeight / 812.0) * screenHeight!;
}
// Get the proportionate height as per screen size
double getProportionateScreenWidth(double inputWidth) {
double? screenWidth = SizeConfig.screenWidth;
// 375 is the layout width that designer use
return (inputWidth / 375.0) * screenWidth!;
}
| 0 |
mirrored_repositories/Phoenix-Travel-Turkey-App | mirrored_repositories/Phoenix-Travel-Turkey-App/test/widget_test.dart | // 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:phoenix_travel_app/main.dart';
void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(const PhoenixTurkeyApp());
// 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);
});
}
| 0 |
mirrored_repositories/Telegram_clone_flutter_ui | mirrored_repositories/Telegram_clone_flutter_ui/lib/main.dart | import 'package:flutter/material.dart';
import 'file:///D:/My%20Flutter%20Projects/telegram_clone_flutter/lib/screens/light_mode/home_screen.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: 'Telegram',
theme: ThemeData(
primaryColor: Color(0xFF5682a3),
accentColor: Color(0xFFe7ebf0),
backgroundColor: Colors.white
),
debugShowCheckedModeBanner: false,
home: HomeScreen(),
);
}
} | 0 |
mirrored_repositories/Telegram_clone_flutter_ui/lib/screens | mirrored_repositories/Telegram_clone_flutter_ui/lib/screens/dark_mode/drawer_dark.dart | import 'package:flutter/material.dart';
import 'file:///D:/My%20Flutter%20Projects/telegram_clone_flutter/lib/screens/light_mode/home_screen.dart';
class DrawerScreenDark extends StatefulWidget {
@override
_DrawerScreenDarkState createState() => _DrawerScreenDarkState();
}
class _DrawerScreenDarkState extends State<DrawerScreenDark> {
var _icon = Icons.wb_sunny;
@override
Widget build(BuildContext context) {
return Drawer(
child: ListView(
children: <Widget>[
UserAccountsDrawerHeader(
decoration: BoxDecoration(
color: Color(0xff212d3b)
),
accountName: Text('Creative'),
currentAccountPicture: CircleAvatar(
backgroundImage: AssetImage('assets/images/img1.jpg'),
),
accountEmail: Text('[email protected]',style: TextStyle(color: Colors.white70),),
otherAccountsPictures: [
IconButton(
icon: Icon(
_icon,
color: Colors.white,
size: 25,
),
onPressed: () {
if (_icon == Icons.wb_sunny) {
_icon = Icons.brightness_2;
Navigator.push(context,MaterialPageRoute(builder: (context) => HomeScreen()),);
} else {
_icon = Icons.wb_sunny;
}
},
),
],
),
ListTile(
title:
Row(
children: [
Icon(Icons.group,color: Colors.grey,),
SizedBox(width: 30,),
Text('New Group',style: TextStyle(color: Colors.white),),
],
),
onTap: () {},
),
ListTile(
title:
Row(
children: [
Icon(Icons.person_outline,color: Colors.grey,),
SizedBox(width: 30,),
Text('Contacts',style: TextStyle(color: Colors.white),),
],
),
onTap: () {},
),
ListTile(
title:
Row(
children: [
Icon(Icons.phone,color: Colors.grey,),
SizedBox(width: 30,),
Text('Calls',style: TextStyle(color: Colors.white),),
],
),
onTap: () {},
),
ListTile(
title:
Row(
children: [
Icon(Icons.place_outlined,color: Colors.grey,),
SizedBox(width: 30,),
Text('People Nearby',style: TextStyle(color: Colors.white),),
],
),
onTap: () {},
),
ListTile(
title:
Row(
children: [
Icon(Icons.bookmark_border,color: Colors.grey,),
SizedBox(width: 30,),
Text('Saved Messages',style: TextStyle(color: Colors.white),),
],
),
onTap: () {},
),
ListTile(
title:
Row(
children: [
Icon(Icons.settings,color: Colors.grey,),
SizedBox(width: 30,),
Text('Setting',style: TextStyle(color: Colors.white),),
],
),
onTap: () {},
),
Divider(color: Colors.black,),
ListTile(
title:
Row(
children: [
Icon(Icons.person_add,color: Colors.grey,),
SizedBox(width: 30,),
Text('Invite Friends',style: TextStyle(color: Colors.white),),
],
),
onTap: () {},
),
ListTile(
title:
Row(
children: [
Icon(Icons.group,color: Colors.grey,),
SizedBox(width: 30,),
Text('Telegram F&Q',style: TextStyle(color: Colors.white),),
],
),
onTap: () {},
),
],
),
);
}
}
class DrawerListTile extends StatelessWidget {
final IconData iconData;
final String title;
final VoidCallback onTilePressed;
const DrawerListTile({Key key, this.iconData, this.title, this.onTilePressed})
: super(key: key);
@override
Widget build(BuildContext context) {
return ListTile(
onTap: onTilePressed,
dense: true,
leading: Icon(iconData),
title: Text(
title,
style: TextStyle(
fontSize: 16,
),
),
);
}
} | 0 |
mirrored_repositories/Telegram_clone_flutter_ui/lib/screens | mirrored_repositories/Telegram_clone_flutter_ui/lib/screens/dark_mode/home_screen_dark.dart | import 'package:flutter/material.dart';
import 'package:telegram_clone_flutter/screens/dark_mode/drawer_dark.dart';
import 'file:///D:/My%20Flutter%20Projects/telegram_clone_flutter/lib/screens/light_mode/drawer.dart';
import 'package:telegram_clone_flutter/screens/models/chat_model.dart';
class HomeScreenDark extends StatefulWidget {
@override
_HomeScreenDarkState createState() => _HomeScreenDarkState();
}
class _HomeScreenDarkState extends State<HomeScreenDark> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color(0xff1d2733),
appBar: AppBar(
backgroundColor: Color(0xff212d3b),
title: Text('Telegram'),
actions: <Widget>[
Padding(
padding: const EdgeInsets.all(8.0),
child: Icon(Icons.search),
)
],
),
drawer: Theme(
data: Theme.of(context).copyWith(
canvasColor: Color(0xff1d2733),
//This will change the drawer background to blue.
//other styles
),
child: DrawerScreenDark(),),
body: Padding(
padding: const EdgeInsets.only(top: 10),
child: ListView.separated(
itemBuilder: (ctx, i) {
return ListTile(
leading: CircleAvatar(
radius: 28,
backgroundImage: AssetImage(items[i].imgPath),
),
title: items[i].status ?
Text(items[i].name,style: TextStyle(fontWeight: FontWeight.bold,color: Colors.white),):
Row(children: [
Text(items[i].name,style: TextStyle(fontWeight: FontWeight.bold,color: Colors.white),),
Icon(Icons.volume_mute,size: 18,color: Color(0xff7d8b98),)
],),
subtitle:Text(items[i].message,style: TextStyle(color: Color(0xff7d8b98)),),
trailing:items[i].messNum!=null ?
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(items[i].time,style: TextStyle(color: Colors.grey),),
SizedBox(height: 7,),
Container(
decoration: BoxDecoration(
color: items[i].status?Color(0xff64b4ef):Color(0xff3e5263),
borderRadius: BorderRadius.circular(30)
),
child:Padding(
padding: const EdgeInsets.all(8.0),
child: Text('${items[i].messNum}',style: TextStyle(color: Colors.white,fontWeight: FontWeight.bold),),
),
)
],
):
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(items[i].time,style: TextStyle(color: Colors.grey),),
SizedBox(height: 7,),
],)
);
},
separatorBuilder: (ctx, i) {
return Divider();
},
itemCount: items.length),
),
floatingActionButton: FloatingActionButton(
child: Icon(Icons.create,color: Colors.white,),
backgroundColor: Color(0xFF65a9e0),
onPressed: (){}),
);
}
} | 0 |
mirrored_repositories/Telegram_clone_flutter_ui/lib/screens | mirrored_repositories/Telegram_clone_flutter_ui/lib/screens/models/chat_model.dart | class ChatModel{
final String name;
final String message;
final String time;
final String imgPath;
final bool status ;
final int messNum;
ChatModel({this.name, this.message, this.time, this.imgPath,this.status,this.messNum});
}
final List<ChatModel> items =[
ChatModel(name: 'Creative 1',message: 'repellat earum qui', time: '10:39',imgPath: 'assets/images/img1.jpg',status: true,messNum: 2000),
ChatModel(name: 'Creative 2 ',message: 'esse minus reiciendis', time: 'Feb 12',imgPath: 'assets/images/img2.jpg',status: false,messNum: 420),
ChatModel(name: 'Creative 3',message: 'suscipit molestias rerum', time: '12:12',imgPath: 'assets/images/img3.jpg',status: false,messNum: 20),
ChatModel(name: 'Creative 4',message: 'quam perferendis ratione', time: '6:11',imgPath: 'assets/images/img4.jpg',status: true),
ChatModel(name: 'Creative 5 ',message: 'blanditiis expedita distinctio', time: 'Jan 1',imgPath: 'assets/images/img5.jpg',status: true,messNum: 50),
ChatModel(name: 'Creative 6',message: 'dolorum dolore at', time: '4:00',imgPath: 'assets/images/img6.jpg',status: true,messNum: 104),
ChatModel(name: 'Creative 7',message: 'ut sunt sequi', time: 'Dec 10',imgPath: 'assets/images/img7.jpg',status: false,messNum: 249),
ChatModel(name: 'Creative 8',message: 'dolorem quisquam dolorem', time: '4:30',imgPath: 'assets/images/img8.jpg',status: false),
ChatModel(name: 'Creative 9',message: 'et laborum mollitia', time: '6:00',imgPath: 'assets/images/img9.jpg',status: true,messNum: 3000),
]; | 0 |
mirrored_repositories/Telegram_clone_flutter_ui/lib/screens | mirrored_repositories/Telegram_clone_flutter_ui/lib/screens/light_mode/home_screen.dart | import 'package:flutter/material.dart';
import 'file:///D:/My%20Flutter%20Projects/telegram_clone_flutter/lib/screens/light_mode/drawer.dart';
import 'package:telegram_clone_flutter/screens/models/chat_model.dart';
class HomeScreen extends StatefulWidget {
@override
_HomeScreenState createState() => _HomeScreenState();
}
class _HomeScreenState extends State<HomeScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Telegram'),
actions: <Widget>[
Padding(
padding: const EdgeInsets.all(8.0),
child: Icon(Icons.search),
)
],
),
drawer: DrawerScreen(),
body: Padding(
padding: const EdgeInsets.only(top: 10),
child: ListView.separated(
itemBuilder: (ctx, i) {
return ListTile(
leading: CircleAvatar(
radius: 28,
backgroundImage: AssetImage(items[i].imgPath),
),
title:items[i].status ?
Text(items[i].name,style: TextStyle(fontWeight: FontWeight.bold),):
Row(children: [
Text(items[i].name,style: TextStyle(fontWeight: FontWeight.bold),),
Icon(Icons.volume_mute,size: 18,color: Colors.grey[400],)
],),
subtitle:Text(items[i].message,style: TextStyle(color: Colors.grey),),
trailing:
items[i].messNum!=null ?
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(items[i].time),
SizedBox(height: 7,),
Container(
decoration: BoxDecoration(
color: items[i].status?Colors.green:Colors.grey[400],
borderRadius: BorderRadius.circular(30)
),
child:Padding(
padding: const EdgeInsets.all(8.0),
child: Text('${items[i].messNum}',style: TextStyle(color: Colors.white),),
),
)
],
):
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(items[i].time),
SizedBox(height: 7,),
],)
);
},
separatorBuilder: (ctx, i) {
return Divider();
},
itemCount: items.length),
),
floatingActionButton: FloatingActionButton(
child: Icon(Icons.create,color: Colors.white,),
backgroundColor: Color(0xFF65a9e0),
onPressed: (){}),
);
}
} | 0 |
mirrored_repositories/Telegram_clone_flutter_ui/lib/screens | mirrored_repositories/Telegram_clone_flutter_ui/lib/screens/light_mode/drawer.dart | import 'package:flutter/material.dart';
import 'package:telegram_clone_flutter/screens/dark_mode/home_screen_dark.dart';
class DrawerScreen extends StatefulWidget {
@override
_DrawerScreenState createState() => _DrawerScreenState();
}
class _DrawerScreenState extends State<DrawerScreen> {
var _icon = Icons.brightness_2;
@override
Widget build(BuildContext context) {
return Drawer(
child: ListView(
children: <Widget>[
UserAccountsDrawerHeader(
accountName: Text('Creative'),
currentAccountPicture: CircleAvatar(
backgroundImage: AssetImage('assets/images/img1.jpg'),
),
accountEmail: Text('[email protected]',style: TextStyle(color: Colors.white70),),
otherAccountsPictures: [
IconButton(
icon: Icon(
_icon,
color: Colors.white,
size: 25,
),
onPressed: () {
if (_icon == Icons.brightness_2) {
_icon = Icons.wb_sunny;
Navigator.push(context,MaterialPageRoute(builder: (context) => HomeScreenDark()),);
} else {
_icon = Icons.brightness_2;
}
},
),
],
),
DrawerListTile(
iconData: Icons.group,
title: 'New Group',
onTilePressed: () {},
),
DrawerListTile(
iconData: Icons.person_outline,
title: 'Contacts',
onTilePressed: () {},
),
DrawerListTile(
iconData: Icons.phone,
title: 'Calls',
onTilePressed: () {},
),
DrawerListTile(
iconData: Icons.place_outlined,
title: 'People Nearby',
onTilePressed: () {},
),
DrawerListTile(
iconData: Icons.bookmark_border,
title: 'Saved Messages',
onTilePressed: () {},
),
DrawerListTile(
iconData: Icons.settings,
title: 'Settings',
onTilePressed: () {},
),
Divider(),
DrawerListTile(
iconData: Icons.person_add,
title: 'Invite Friends',
onTilePressed: () {},
),
DrawerListTile(
iconData: Icons.help_outline,
title: 'Telegram FAQ',
onTilePressed: () {},
)
],
),
);
}
}
class DrawerListTile extends StatelessWidget {
final IconData iconData;
final String title;
final VoidCallback onTilePressed;
const DrawerListTile({Key key, this.iconData, this.title, this.onTilePressed})
: super(key: key);
@override
Widget build(BuildContext context) {
return ListTile(
onTap: onTilePressed,
dense: true,
leading: Icon(iconData),
title: Text(
title,
style: TextStyle(
fontSize: 16,
),
),
);
}
} | 0 |
mirrored_repositories/Telegram_clone_flutter_ui | mirrored_repositories/Telegram_clone_flutter_ui/test/widget_test.dart | // 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:telegram_clone_flutter/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);
});
}
| 0 |
mirrored_repositories/Quizzler-Flutter-App | mirrored_repositories/Quizzler-Flutter-App/lib/question.dart | class Question {
String questionText;
bool questionAnswer;
Question(this.questionText, this.questionAnswer);
// Question({String q, bool a}) {
// questionText = q;
// questionAnswer = a;
// }
} | 0 |
mirrored_repositories/Quizzler-Flutter-App | mirrored_repositories/Quizzler-Flutter-App/lib/quiz_brain.dart | import 'question.dart';
class QuizBrain {
int _i=0;
List<Question> _questionBank = [
Question( 'Some cats are actually allergic to humans', true),
Question('You can lead a cow down stairs but not up stairs.', false),
Question( 'Approximately one quarter of human bones are in the feet.', true),
Question( 'A slug\'s blood is green.', true),
Question( 'Buzz Aldrin\'s mother\'s maiden name was \"Moon\".', true),
Question( 'It is illegal to pee in the Ocean in Portugal.', true),
Question(
'No piece of square dry paper can be folded in half more than 7 times.',
false),
Question(
'In London, UK, if you happen to die in the House of Parliament, you are technically entitled to a state funeral, because the building is considered too sacred a place.',
true),
Question(
'The loudest sound produced by any animal is 188 decibels. That animal is the African Elephant.',
false),
Question(
'The total surface area of two human lungs is approximately 70 square metres.',
true),
Question( 'Google was originally called \"Backrub\".', true),
Question(
'Chocolate affects a dog\'s heart and nervous system; a few ounces are enough to kill a small dog.',
true),
Question(
'In West Virginia, USA, if you accidentally hit an animal with your car, you are free to take it home to eat.',
true),
];
void nextQuestion() {
if(_i < _questionBank.length-1)
_i++;
}
String getQuestionText() {
return _questionBank[_i].questionText;
}
bool getQuestionAnswer() {
return _questionBank[_i].questionAnswer;
}
bool isFinished() {
if(_i == _questionBank.length-1)
return true;
else
return false;
}
void reset() {
_i=0;
}
}
| 0 |
mirrored_repositories/Quizzler-Flutter-App | mirrored_repositories/Quizzler-Flutter-App/lib/main.dart | import 'package:flutter/material.dart';
import 'package:rflutter_alert/rflutter_alert.dart';
//import 'rflutter_alert';
import 'quiz_brain.dart';
QuizBrain quizBrain = QuizBrain();
void main() => runApp(Quizzler());
class Quizzler extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
backgroundColor: Colors.grey.shade900,
body: SafeArea(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 10.0),
child: QuizPage(),
),
),
),
);
}
}
class QuizPage extends StatefulWidget {
@override
_QuizPageState createState() => _QuizPageState();
}
class _QuizPageState extends State<QuizPage> {
List<Icon> scoreKeeper = [
];
// List<String> questions = [
// 'You can lead a cow down stairs but not up stairs.',
// 'Approximately one quarter of human bones are in the feet.',
// 'A slug\'s blood is green.'
// ];
//
// List<bool> answers = [
// false,
// true,
// true,
// ];
//
// Question q1 = Question(q: 'You can lead a cow down stairs but not up stairs.', a: false);
// int i=0;
void checkAnswer(bool userPickedAnswer) {
bool correctAns = quizBrain.getQuestionAnswer();
setState(() {
if( quizBrain.isFinished() == true) {
Alert alpha1 = Alert(context: context, title: "STOP", desc: "Limit of questions is reached.");
alpha1.show();
quizBrain.reset();
scoreKeeper.clear();
}
if(correctAns == userPickedAnswer) {
scoreKeeper.add(
Icon(
Icons.check,
color: Colors.green,
),
);
} else{
scoreKeeper.add(
Icon(
Icons.close,
color: Colors.red,
),
);
}
quizBrain.nextQuestion();
});
}
@override
Widget build(BuildContext context) {
return Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Expanded(
flex: 5,
child: Padding(
padding: EdgeInsets.all(10.0),
child: Center(
child: Text(
quizBrain.getQuestionText(),
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 25.0,
color: Colors.white,
),
),
),
),
),
Expanded(
child: Padding(
padding: EdgeInsets.all(15.0),
child: FlatButton(
textColor: Colors.white,
color: Colors.green,
child: Text(
'True',
style: TextStyle(
color: Colors.white,
fontSize: 20.0,
),
),
onPressed: () {
checkAnswer(true);
},
),
),
),
Expanded(
child: Padding(
padding: EdgeInsets.all(15.0),
child: FlatButton(
color: Colors.red,
child: Text(
'False',
style: TextStyle(
fontSize: 20.0,
color: Colors.white,
),
),
onPressed: () {
checkAnswer(false);
},
),
),
),
Row(
children: scoreKeeper,
)
],
);
}
}
/*
question1: 'You can lead a cow down stairs but not up stairs.', false,
question2: 'Approximately one quarter of human bones are in the feet.', true,
question3: 'A slug\'s blood is green.', true,
*/
| 0 |
mirrored_repositories/first-app-made-in-Flutter | mirrored_repositories/first-app-made-in-Flutter/lib/main.dart | import 'package:flutter/material.dart';
import 'package:questions_app/components/btnWithTheAnswer.dart';
import 'package:questions_app/components/quiz.dart';
import 'package:questions_app/components/result.dart';
import 'components/questions.dart';
void main() => runApp(QuestionApp());
class QuestionAppState extends State<QuestionApp> {
int whatQuestion = 0;
double grades = 0;
final List<Map<String, Object>> _questions = const [
{
'question': 'Qual sua cor favorita?',
'answers': [
{'text': 'Azul', 'grade': 9.5},
{'text': 'Preto', 'grade': 4.5},
]
},
{
'question': 'Qual sua linguagem de programação favorita?',
'answers': [
{'text': 'Javascript', 'grade': 2.0},
{'text': 'Dart', 'grade': 5.5}
]
}
];
bool get selectedQuestion {
return whatQuestion < _questions.length;
}
@override
Widget build(BuildContext context) {
void handleClick({required String answer, required double grade}) {
grades += grade;
setState(() {
whatQuestion++;
});
}
void handleResetQuiz() {
setState(() {
grades = 0;
whatQuestion = 0;
});
}
return MaterialApp(
debugShowCheckedModeBanner: false,
theme: ThemeData.dark(),
home: Scaffold(
appBar: AppBar(
centerTitle: true,
title: Text(
'Questions',
),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
!selectedQuestion
? Result(total: grades, resetQuiz: handleResetQuiz)
: Quiz(
questions: _questions,
whatQuestion: whatQuestion,
handleClick: handleClick,
selectedQuestion: selectedQuestion)
],
)),
),
);
}
}
class QuestionApp extends StatefulWidget {
QuestionAppState createState() {
return QuestionAppState();
}
}
| 0 |
mirrored_repositories/first-app-made-in-Flutter/lib | mirrored_repositories/first-app-made-in-Flutter/lib/components/quiz.dart | import 'package:flutter/material.dart ';
import 'package:questions_app/components/btnWithTheAnswer.dart';
import 'package:questions_app/components/questions.dart';
class Quiz extends StatelessWidget {
final List<Map<String, Object>> questions;
final int whatQuestion;
final void Function({required String answer, required double grade})
handleClick;
final bool selectedQuestion;
Quiz(
{required this.questions,
required this.whatQuestion,
required this.handleClick,
required this.selectedQuestion});
@override
Widget build(BuildContext context) {
List<Map<String, Object>> allAnswers =
selectedQuestion ? questions[whatQuestion].cast()['answers'] : [];
return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding: EdgeInsets.all(8.0),
child: Question(
text: questions[whatQuestion]['question'].toString(), size: 18),
),
...allAnswers
.map((e) => BtnWithTheAnswer(
handleClick: handleClick,
text: e['text'].toString(),
grade: double.parse(e['grade'].toString()),
))
.toList()
],
);
}
}
| 0 |
mirrored_repositories/first-app-made-in-Flutter/lib | mirrored_repositories/first-app-made-in-Flutter/lib/components/result.dart | import 'package:flutter/material.dart';
class Result extends StatelessWidget {
final String title;
final double total;
final void Function() resetQuiz;
Result(
{this.title = 'Finish!! 🎉',
required this.total,
required this.resetQuiz});
@override
Widget build(BuildContext context) {
return Column(
children: [
Text(
this.title,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 40,
color: Color.fromARGB(255, 118, 0, 148)),
),
Padding(
padding: const EdgeInsets.only(top: 10, bottom: 10),
child: Text(
'You scored ${this.total.round()} points',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,
color: Color.fromARGB(255, 255, 255, 255)),
),
),
ElevatedButton(
onPressed: this.resetQuiz,
style: ElevatedButton.styleFrom(fixedSize: Size.fromWidth(150)),
child: Row(
children: [Icon(Icons.backspace_rounded), Text('Reset quiz')],
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
),
),
],
);
}
}
| 0 |
mirrored_repositories/first-app-made-in-Flutter/lib | mirrored_repositories/first-app-made-in-Flutter/lib/components/btnWithTheAnswer.dart | import 'package:flutter/material.dart';
class BtnWithTheAnswer extends StatelessWidget {
final void Function({required String answer, required double grade})
handleClick;
final String text;
final double grade;
BtnWithTheAnswer(
{required this.handleClick, required this.text, required this.grade});
@override
Widget build(BuildContext build) {
return ElevatedButton(
style: ElevatedButton.styleFrom(primary: Colors.purple[600]),
onPressed: () => this.handleClick(answer: this.text, grade: this.grade),
child: Text(this.text, style: TextStyle(fontSize: 16)));
}
}
| 0 |
mirrored_repositories/first-app-made-in-Flutter/lib | mirrored_repositories/first-app-made-in-Flutter/lib/components/questions.dart | import 'package:flutter/material.dart';
class Question extends StatelessWidget {
final String text;
final double size;
Question({required this.text, this.size = 14});
@override
Widget build(BuildContext context) {
return Text(
text,
style: TextStyle(fontSize: size),
);
}
}
| 0 |
mirrored_repositories/FlutterApp_Harry_Potter_Houses | mirrored_repositories/FlutterApp_Harry_Potter_Houses/lib/question.dart | class Question {
String questionTitle;
String choice1;
String choice2;
Question({
required this.questionTitle,
required this.choice1,
required this.choice2,
});
}
| 0 |
mirrored_repositories/FlutterApp_Harry_Potter_Houses | mirrored_repositories/FlutterApp_Harry_Potter_Houses/lib/main.dart | import 'package:flutter/material.dart';
import 'package:herryschool/helper.dart';
Helper helper = Helper();
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp(
home: Home(),
);
}
}
class Home extends StatefulWidget {
const Home({super.key});
@override
State<Home> createState() => _HomeState();
}
class _HomeState extends State<Home> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: const Color(0x00282b30),
body: Container(
padding: const EdgeInsets.symmetric(vertical: 50.0, horizontal: 15.0),
constraints: const BoxConstraints.expand(),
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('images/harrypotter.jpg'),
),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
// ignore: prefer_const_literals_to_create_immutables
children: [
// ignore: prefer_const_constructors
Expanded(
flex: 12,
child: Center(
child: Padding(
padding: const EdgeInsets.only(top: 120),
child: Text(
helper.getQuestion(),
style: const TextStyle(
fontSize: 25,
color: Colors.white,
),
textAlign: TextAlign.center,
),
),
),
),
Expanded(
flex: 2,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: Colors.green[400],
),
onPressed: () {
setState(() {
helper.nextQuestion(1);
});
},
// ignore: prefer_const_constructors
child: Text(
helper.getChoice1(),
style: const TextStyle(
fontSize: 20,
),
),
),
),
// ignore: prefer_const_constructors
SizedBox(
height: 20,
),
Expanded(
flex: 2,
child: Visibility(
visible: helper.buttonShouldBeVisible(),
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: Colors.deepPurple[400],
),
onPressed: () {
setState(() {
helper.nextQuestion(2);
});
},
// ignore: prefer_const_constructors
child: Text(
helper.getChoice2(),
style: const TextStyle(fontSize: 20),
),
),
),
),
],
),
),
);
}
}
| 0 |
mirrored_repositories/FlutterApp_Harry_Potter_Houses | mirrored_repositories/FlutterApp_Harry_Potter_Houses/lib/helper.dart | import 'question.dart';
class Helper {
int _questionNumber = 0;
final List<Question> _questionData = [
Question(
questionTitle:
'Olá futuro bruxo(a)! Vamos descobrir qual é a casa ideal para você em Hogwarts? E a primeira questão é: com quais dos substantivos você se identifica mais?',
choice1: 'Coragem e gentileza',
choice2: 'Ambição e inteligência'),
Question(
questionTitle:
'Você prefere quebrar as regras e conquistar algo de forma rápida ou prefere utilizar a inteligência e estudar para então conquistar?',
choice1: 'Prefiro quebrar as regras',
choice2: 'Utilizo a inteligência e estudos'),
Question(
questionTitle: 'O que se encaixa melhor com o seu perfil?',
choice1: 'Ousadia e astúcia',
choice2: 'Paciência e sinceridade'),
Question(
questionTitle: 'Você ficará muito bem aos cuidados da SONSERINA',
choice1: 'Refazer teste',
choice2: ''),
Question(
questionTitle: 'Você ficará muito bem aos cuidados da LUFA-LUFA!',
choice1: 'Refazer teste',
choice2: ''),
Question(
questionTitle: 'Você ficará muito bem aos cuidados da GRIFINÓRIA!',
choice1: 'Refazer teste',
choice2: ''),
Question(
questionTitle: 'Você ficará muito bem aos cuidados da CORVINAL!',
choice1: 'Refazer teste',
choice2: '')
];
String getQuestion() {
return _questionData[_questionNumber].questionTitle;
}
String getChoice1() {
return _questionData[_questionNumber].choice1;
}
String getChoice2() {
return _questionData[_questionNumber].choice2;
}
void restart() {
_questionNumber = 0;
}
bool buttonShouldBeVisible() {
if (_questionNumber == 0 || _questionNumber == 1 || _questionNumber == 2) {
return true;
} else {
return false;
}
}
void nextQuestion(int userChoice) {
if (_questionNumber == 0 && userChoice == 1) {
_questionNumber = 2;
} else if (_questionNumber == 0 && userChoice == 2) {
_questionNumber = 1;
} else if (_questionNumber == 1 && userChoice == 1) {
_questionNumber = 3;
} else if (_questionNumber == 1 && userChoice == 2) {
_questionNumber = 6;
} else if (_questionNumber == 2 && userChoice == 1) {
_questionNumber = 5;
} else if (_questionNumber == 2 && userChoice == 2) {
_questionNumber = 4;
} else if (_questionNumber == 3 ||
_questionNumber == 4 ||
_questionNumber == 5 ||
_questionNumber == 6) {
restart();
}
}
}
| 0 |
mirrored_repositories/FootballSchedule | mirrored_repositories/FootballSchedule/lib/main.dart | import 'package:flutter/material.dart';
import 'package:football_schedule/home.dart';
void main() =>
runApp(new MaterialApp(
title: 'Football Schedule',
home: Home(),
));
| 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.