Skip to content
Open
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
81 changes: 81 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import 'package:flutter/material.dart';

void main() {
runApp(const MyApp());
}

class MyApp extends StatelessWidget {
const MyApp({super.key});

@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Modernized App',
debugShowCheckedModeBanner: false,
// 1. ADIM: DARK MODE DESTEĞİ (Rubrik Puanı)
theme: ThemeData(
useMaterial3: true,
colorSchemeSeed: Colors.blue,
brightness: Brightness.light,
),
darkTheme: ThemeData(
useMaterial3: true,
colorSchemeSeed: Colors.indigo,
brightness: Brightness.dark,
),
themeMode: ThemeMode.system, // Sisteme göre otomatik değişir
home: const MyHomePage(),
);
}
}

class MyHomePage extends StatefulWidget {
const MyHomePage({super.key});

@override
State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
bool isTurkish = true; // 2. ADIM: DİL DESTEĞİ (Rubrik Puanı)

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(isTurkish ? "Modern Flutter Örneği" : "Modern Flutter Example"),
centerTitle: true,
elevation: 2,
),
body: Center(
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Icon(Icons.flutter_dash, size: 100, color: Colors.blue),
const SizedBox(height: 20),
Text(
isTurkish
? "Bu repo, harika uygulamaların koleksiyonudur."
: "This repo is a collection of awesome apps.",
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.headlineSmall,
),
const SizedBox(height: 30),
ElevatedButton.icon(
onPressed: () {
setState(() {
isTurkish = !isTurkish;
});
},
icon: const Icon(Icons.language),
label: Text(isTurkish ? "English'e Çevir" : "Switch to Turkish"),
),
],
),
),
),
);
}
}
18 changes: 18 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: flutter_example_apps
description: Modernized version of Flutter examples for university project.
publish_to: 'none'
version: 1.0.0+1

environment:
sdk: '>=3.0.0 <4.0.0' # İşte Null Safety ve Modern Flutter burada başlıyor

dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.5
intl: ^0.18.1 # Çoklu dil (Localization) için lazım

dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^3.0.0