-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kendi J
authored and
Kendi J
committed
Oct 6, 2023
1 parent
8e7611e
commit f247302
Showing
20 changed files
with
344 additions
and
115 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" | ||
#include "Generated.xcconfig" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" | ||
#include "Generated.xcconfig" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Uncomment this line to define a global platform for your project | ||
# platform :ios, '11.0' | ||
|
||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency. | ||
ENV['COCOAPODS_DISABLE_STATS'] = 'true' | ||
|
||
project 'Runner', { | ||
'Debug' => :debug, | ||
'Profile' => :release, | ||
'Release' => :release, | ||
} | ||
|
||
def flutter_root | ||
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) | ||
unless File.exist?(generated_xcode_build_settings_path) | ||
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" | ||
end | ||
|
||
File.foreach(generated_xcode_build_settings_path) do |line| | ||
matches = line.match(/FLUTTER_ROOT\=(.*)/) | ||
return matches[1].strip if matches | ||
end | ||
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" | ||
end | ||
|
||
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) | ||
|
||
flutter_ios_podfile_setup | ||
|
||
target 'Runner' do | ||
use_frameworks! | ||
use_modular_headers! | ||
|
||
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) | ||
target 'RunnerTests' do | ||
inherit! :search_paths | ||
end | ||
end | ||
|
||
post_install do |installer| | ||
installer.pods_project.targets.each do |target| | ||
flutter_additional_ios_build_settings(target) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,165 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:weather_app/presentation/widgets/consts/theme.dart'; | ||
|
||
class RainyView extends StatefulWidget { | ||
const RainyView({super.key}); | ||
|
||
@override | ||
State<StatefulWidget> createState() => _RainyView(); | ||
} | ||
|
||
class _RainyView extends State<RainyView> { | ||
@override | ||
Widget build(BuildContext context) { | ||
return const Scaffold( | ||
backgroundColor: AppThemes.rainy, | ||
body: Column( | ||
children: [ImageWidget(), Expanded(child: DaysWeatherView())], | ||
), | ||
); | ||
} | ||
} | ||
|
||
class ImageWidget extends StatelessWidget { | ||
const ImageWidget({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Container( | ||
height: 400, | ||
width: MediaQuery.of(context).size.width, | ||
decoration: const BoxDecoration( | ||
image: DecorationImage( | ||
image: AssetImage('assets/images/forest_rainy.png'), | ||
fit: BoxFit.fitHeight), | ||
), | ||
child: const Column( | ||
mainAxisSize: MainAxisSize.min, | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
crossAxisAlignment: CrossAxisAlignment.center, | ||
children: [ | ||
Text( | ||
'15°', | ||
style: TextStyle( | ||
fontSize: 60, fontWeight: FontWeight.bold, color: Colors.white), | ||
), | ||
Text( | ||
'RAINY', | ||
style: TextStyle( | ||
fontSize: 32, | ||
fontWeight: FontWeight.normal, | ||
color: Colors.white), | ||
), | ||
], | ||
), | ||
); | ||
} | ||
} | ||
|
||
class DaysWeatherView extends StatelessWidget { | ||
const DaysWeatherView({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Column( | ||
children: [ | ||
// title | ||
const Row( | ||
children: [ | ||
// min | ||
Expanded( | ||
child: Column( | ||
mainAxisSize: MainAxisSize.min, | ||
children: [ | ||
Text( | ||
"10°", | ||
style: TextStyle(color: Colors.white), | ||
), | ||
Text( | ||
"min", | ||
style: TextStyle(color: Colors.white), | ||
), | ||
], | ||
)), | ||
//curent | ||
Expanded( | ||
child: Column( | ||
mainAxisSize: MainAxisSize.min, | ||
children: [ | ||
Text( | ||
"19°", | ||
style: TextStyle(color: Colors.white), | ||
), | ||
Text( | ||
"current", | ||
style: TextStyle(color: Colors.white), | ||
), | ||
], | ||
)), | ||
// max | ||
Expanded( | ||
child: Column( | ||
mainAxisSize: MainAxisSize.min, | ||
children: [ | ||
Text( | ||
"19°", | ||
style: TextStyle(color: Colors.white), | ||
), | ||
Text( | ||
"max", | ||
style: TextStyle(color: Colors.white), | ||
), | ||
], | ||
)) | ||
], | ||
), | ||
const Divider(color: Colors.white), | ||
...<DayWeather>[ | ||
DayWeather(day: "Monday", temperature: 23), | ||
DayWeather(day: "Tuesday", temperature: 23), | ||
DayWeather(day: "Wednesday", temperature: 23), | ||
DayWeather(day: "Thursday", temperature: 23), | ||
DayWeather(day: "Friday", temperature: 23), | ||
DayWeather(day: "Saturday", temperature: 23), | ||
DayWeather(day: "Sunday", temperature: 23), | ||
] | ||
.map((e) => Padding( | ||
padding: const EdgeInsets.all(8.0), | ||
child: | ||
Row( | ||
mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
children: [ | ||
Expanded( | ||
child: Text( | ||
e.day, | ||
style: const TextStyle(color: Colors.white), | ||
)), | ||
const Expanded( | ||
child: Icon( | ||
Icons.sunny, | ||
color: Colors.white, | ||
), | ||
), | ||
Expanded( | ||
child: Text( | ||
"${e.temperature} °", | ||
style: const TextStyle(color: Colors.white), | ||
)), | ||
], | ||
), | ||
)) | ||
.toList() | ||
], | ||
); | ||
} | ||
} | ||
|
||
class DayWeather { | ||
final String day; | ||
final num temperature; | ||
|
||
DayWeather({ | ||
required this.day, | ||
required this.temperature, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class AppThemes { | ||
static const sunny = Color(0xFF47AB2F); | ||
static const rainy = Color(0xFF57575D); | ||
static const cloudy = Color(0xFF54717A); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import 'package:location/location.dart'; | ||
|
||
class WeatherService { | ||
static Future<dynamic> getWeather() async { | ||
final String key = ''; | ||
LocationData location = await Location().getLocation(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" | ||
#include "ephemeral/Flutter-Generated.xcconfig" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" | ||
#include "ephemeral/Flutter-Generated.xcconfig" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
platform :osx, '10.14' | ||
|
||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency. | ||
ENV['COCOAPODS_DISABLE_STATS'] = 'true' | ||
|
||
project 'Runner', { | ||
'Debug' => :debug, | ||
'Profile' => :release, | ||
'Release' => :release, | ||
} | ||
|
||
def flutter_root | ||
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) | ||
unless File.exist?(generated_xcode_build_settings_path) | ||
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" | ||
end | ||
|
||
File.foreach(generated_xcode_build_settings_path) do |line| | ||
matches = line.match(/FLUTTER_ROOT\=(.*)/) | ||
return matches[1].strip if matches | ||
end | ||
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" | ||
end | ||
|
||
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) | ||
|
||
flutter_macos_podfile_setup | ||
|
||
target 'Runner' do | ||
use_frameworks! | ||
use_modular_headers! | ||
|
||
flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) | ||
target 'RunnerTests' do | ||
inherit! :search_paths | ||
end | ||
end | ||
|
||
post_install do |installer| | ||
installer.pods_project.targets.each do |target| | ||
flutter_additional_macos_build_settings(target) | ||
end | ||
end |
Oops, something went wrong.