Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions $PROFILE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Set-Alias fbar "flutter build apk --release"
Set-Alias fbad "flutter build apk --debug"
Set-Alias fr "flutter run"
Set-Alias fbr "flutter pub run build_runner build --delete-conflicting-outputs"
Set-Alias fpg "flutter pub get"
Set-Alias fc "flutter clean"
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
API_KEY="31QfpYJrZQMyc1DDy2yP2T:5F5a6rC1re42ZICQOrQo8Y"
API_KEY=31QfpYJrZQMyc1DDy2yP2T:5F5a6rC1re42ZICQOrQo8Y
31 changes: 31 additions & 0 deletions .github/workflows/flutter_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Flutter CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- run: flutter --version

- name: Install dependencies
run: flutter pub get

- name: Run Build Runner
run: dart run build_runner build --delete-conflicting-outputs

- name: Run Flutter Analyze
run: flutter analyze --no-pub --fatal-infos --fatal-warnings

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Flutter ile geliştirilmiş modern hava durumu uygulaması.
> Görselleri `assets/img/` klasörüne ekleyebilirsin.
> Aşağıdaki tablo örnek olarak hazırlanmıştır.

| 🌤️ Anasayfa | 🔍 Şehir Arama | 📊 Detay Sayfası |
|-------------|----------------|-----------------|
| 🌤️ Anasayfa | 🔍 Şehir Arama | 📊 Detay Sayfası | 📊 Şehir Seçme Sayfası |
|-------------|----------------|-----------------|-----------------|
| ![home](assets/screenshots/home_screen.jpg) | ![filter](assets/screenshots/filter_screen.jpg) | ![drawable](assets/screenshots/drawable_screen.jpg) | ![city](assets/screenshots/sehir.jpg) |

---
Expand Down
Binary file added flutter_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 24 additions & 16 deletions lib/common/bottom_app_navigation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:weather_app/common/controller/pages_index_controller.dart';
import 'package:weather_app/common/theme_extension';
import 'package:weather_app/common/widgets/card.dart';
import 'package:weather_app/features/filters_screen/presentation/filters_screen.dart';
import 'package:weather_app/features/home_screen/controller/is_card_visible.dart';
Expand All @@ -24,6 +25,8 @@ class _BottomAppNavigationBarState
Widget build(BuildContext context) {
bool isCardVisible = ref.watch(isCardVisibleProvider);
int state = ref.watch(pagesIndexProvider);
ColorScheme colorScheme = Theme.of(context).colorScheme;
TextTheme textTheme = Theme.of(context).textTheme;

return Scaffold(
extendBody: true,
Expand All @@ -33,11 +36,11 @@ class _BottomAppNavigationBarState
// 🔹 Ortada + buton
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
floatingActionButton: DecoratedBox(
decoration: const BoxDecoration(
decoration: BoxDecoration(
shape: BoxShape.circle,
boxShadow: <BoxShadow>[
BoxShadow(
color: Colors.black26,
color: context.colors.onSurface,
blurRadius: 10,
offset: Offset(0, 4),
),
Expand All @@ -49,10 +52,10 @@ class _BottomAppNavigationBarState
onPressed: () {
ref
.read(isCardVisibleProvider.notifier)
.switchVisibility(!isCardVisible);
.switchVisibility(!isCardVisible);
if (!isCardVisible) {
showModalBottomSheet(
barrierColor: Colors.black.withValues(alpha: 0.2),
showModalBottomSheet<void>(
barrierColor: context.colors.onSurface.withValues(alpha: 0.2),
context: context,
isScrollControlled: true, // tam ekran genişleyebilir
backgroundColor: Colors.transparent, // köşeler yumuşak görünür
Expand All @@ -68,7 +71,7 @@ class _BottomAppNavigationBarState
},
child: Icon(
isCardVisible ? Icons.close : Icons.add,
color: Colors.white,
color: context.colors.surface,
),
),
),
Expand All @@ -82,7 +85,7 @@ class _BottomAppNavigationBarState
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
child: BottomAppBar(
color: Colors.white.withValues(alpha: 0.1),
color: context.colors.surface.withValues(alpha: 0.1),
shape: const CircularNotchedRectangle(),
notchMargin: 8,
child: Row(
Expand All @@ -92,14 +95,20 @@ class _BottomAppNavigationBarState
icon: Icons.person_rounded,
label: 'home'.tr(),
isActive: state == 0,
onTap: () => ref.read(pagesIndexProvider.notifier).setIndex(0),
onTap: () =>
ref.read(pagesIndexProvider.notifier).setIndex(0),
colorScheme: colorScheme,
textTheme: textTheme,
),
const SizedBox(width: 60), // orta + buton boşluğu
_navButton(
icon: Icons.filter_alt_rounded,
label: 'filter'.tr(),
isActive: state == 1,
onTap: () => ref.read(pagesIndexProvider.notifier).setIndex(1),
onTap: () =>
ref.read(pagesIndexProvider.notifier).setIndex(1),
colorScheme: colorScheme,
textTheme: textTheme,
),
],
),
Expand All @@ -114,6 +123,8 @@ class _BottomAppNavigationBarState
required String label,
required bool isActive,
required VoidCallback onTap,
required TextTheme textTheme,
required ColorScheme colorScheme,
}) {
return GestureDetector(
onTap: onTap,
Expand All @@ -125,7 +136,7 @@ class _BottomAppNavigationBarState

decoration: BoxDecoration(
color: isActive
? const Color(0xFF7F5AF0).withValues(alpha: 0.15)
? colorScheme.primary.withValues(alpha: 0.15)
: Colors.transparent,
borderRadius: BorderRadius.circular(12),
),
Expand All @@ -134,17 +145,14 @@ class _BottomAppNavigationBarState
size: 26,
color: isActive
? const Color(0xFF7F5AF0)
: Colors.white.withValues(alpha: 0.7),
: context.colors.surface.withValues(alpha: 0.7),
),
),
const SizedBox(height: 3),
Text(
label,
style: TextStyle(
color: isActive
? const Color(0xFF7F5AF0)
: Colors.white.withValues(alpha: 0.6),
fontSize: 12,
style: textTheme.bodyMedium?.copyWith(
color: isActive ? colorScheme.primary : colorScheme.surface,
),
),
],
Expand Down
1 change: 1 addition & 0 deletions lib/common/controller/pages_index_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class PagesIndex extends _$PagesIndex {
return 0;
}

// ignore: use_setters_to_change_properties
void setIndex(int newIndex) {
state = newIndex;
}
Expand Down
24 changes: 24 additions & 0 deletions lib/common/controller/select_day_weather.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import 'package:riverpod_annotation/riverpod_annotation.dart';
import 'package:weather_app/features/home_screen/domain/weather_model.dart';
part 'select_day_weather.g.dart';
@Riverpod(keepAlive: true)
class SelectDayWeather extends _$SelectDayWeather {
@override
WeatherModel build() {
return WeatherModel(
date: '',
day: '',
description: '',
degree: '',
min: '',
max: '',
night: '',
humidity: '',
);
}

// ignore: use_setters_to_change_properties
void switcWeatherModel(WeatherModel weatherModel) {
state = weatherModel;
}
}
26 changes: 26 additions & 0 deletions lib/common/controller/select_day_weather.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions lib/common/theme_extension
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import 'package:flutter/material.dart';

extension ThemeExtension on BuildContext {
ColorScheme get colors => Theme.of(this).colorScheme;
TextTheme get texts => Theme.of(this).textTheme;
}
Loading