Skip to content

Commit

Permalink
Change home screen design, alongside with some other stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
manyet1k committed Apr 22, 2022
1 parent eccd434 commit f5e58b9
Show file tree
Hide file tree
Showing 6 changed files with 151 additions and 59 deletions.
6 changes: 1 addition & 5 deletions TODO.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
- Tasarımı geliştir
-- Koyu tema ekle
-- Satır araları
-- Resim boyutu ayarla
-- Navbar rengini ayarla
- Yazıların arasına boşluk bırakacağız
- Çeviriler
-- Resim boyutu ayarla
25 changes: 20 additions & 5 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

android {
compileSdkVersion flutter.compileSdkVersion

Expand All @@ -42,8 +48,7 @@ android {
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.read_math"
applicationId "com.tedsakaryakoleji.read_math"
minSdkVersion 21
targetSdkVersion 31
versionCode flutterVersionCode.toInteger()
Expand All @@ -52,9 +57,19 @@ android {

buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
}
}
}
Expand Down
20 changes: 17 additions & 3 deletions lib/about_us.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class AboutUs extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Container(
constraints: const BoxConstraints.tightFor(height: 200),
constraints: const BoxConstraints.tightFor(height: 300),
child: CachedNetworkImage(
imageUrl: "https://twinspace.etwinning.net/files/collabspace/4/44/644/197644/images/ba77953d8.jpg",
placeholder: (context, url) => const Center(child: SizedBox(
Expand Down Expand Up @@ -50,7 +50,7 @@ class AboutUs extends StatelessWidget {
Container(
padding: const EdgeInsets.fromLTRB(20, 20, 20, 10),
child: const Text(
"Math-Maker kulübü üyeleri\nBeril Zeynep Ayyıldız\nMina Mollaoğlu\nMustafa Efe Güzel\nOsman Talha Taka\nUlaş Kuşçu\nZeynep Pelin Ceyhan\n",
"TED Sakarya Koleji Math-Maker Kulübü Üyeleri\nMustafa Efe Güzel (Kulüp Başkanı, Uygulama Geliştiricisi)\nOsman Talha Taka (Uygulama Geliştiricisi)\nBeril Zeynep Ayyıldız\nMina Mollaoğlu\nUlaş Kuşçu\nZeynep Pelin Ceyhan\n",
style: Styles.textDefault,
)
),
Expand All @@ -65,6 +65,20 @@ class AboutUs extends StatelessWidget {
label: const Text("Bize E-Posta Gönderin")
)
),
Container(
padding: const EdgeInsets.fromLTRB(20, 20, 20, 10),
child: const Text(
"Proje Kurucuları",
style: Styles.header,
)
),
Container(
padding: const EdgeInsets.fromLTRB(20, 20, 20, 10),
child: const Text(
"İbrahim Soykan, TED Sakarya Koleji\nGulshan Hajiyeva, Baku, 99 nomreli ta orta mekteb",
style: Styles.textDefault,
)
),

Container(
padding: const EdgeInsets.fromLTRB(20, 20, 20, 10),
Expand All @@ -76,7 +90,7 @@ class AboutUs extends StatelessWidget {
Container(
padding: const EdgeInsets.fromLTRB(20, 20, 20, 10),
child: const Text(
"İbrahim Soykan, TED Sakarya Koleji\nGözde Dirmenci, TED Sakarya Koleji\nIraz KIYICI, TED Sakarya Koleji\nDerya KOCAÇİNAR, Mehmet Akif İnan Ortaokulu\nGulshan Hajiyeva, Baku, 99 nomreli ta orta mekteb\nMehtap Üzer, Özel Mürüvvet Evyap Okulları\nReyhan VAHAPOĞLU, Silopi Atatürk Anadolu Lisesi\nSülhiye Yazıcı, Köprülü Mehmet Paşa Anadolu Lisesi\nYasin MERCAN, Kütahya Fatih Ortaokulu\nÖzlem GÖKKAYA, Buca Mehmet Akif Ersoy Sosyal Bilimler Lisesi",
"Gözde Dirmenci, TED Sakarya Koleji\nIraz KIYICI, TED Sakarya Koleji\nDerya KOCAÇİNAR, Mehmet Akif İnan Ortaokulu\nMehtap Üzer, Özel Mürüvvet Evyap Okulları\nReyhan VAHAPOĞLU, Silopi Atatürk Anadolu Lisesi\nSülhiye Yazıcı, Köprülü Mehmet Paşa Anadolu Lisesi\nYasin MERCAN, Kütahya Fatih Ortaokulu\nÖzlem GÖKKAYA, Buca Mehmet Akif Ersoy Sosyal Bilimler Lisesi",
style: Styles.textDefault,
)
),
Expand Down
105 changes: 81 additions & 24 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'styles.dart';
import 'navbar.dart';
import 'research_report.dart';
import 'about_us.dart';
import 'package:cached_network_image/cached_network_image.dart';
void main() {
runApp(const MyApp());
}
Expand Down Expand Up @@ -47,38 +48,94 @@ class HomeScreen extends StatelessWidget{
),
Padding(
padding: const EdgeInsets.fromLTRB(20, 20, 20, 10),
child: Image.asset("assets/images/homescreen_logo.jpg"),
),
child: CachedNetworkImage(
imageUrl: "https://twinspace.etwinning.net/files/collabspace/4/44/644/197644/images/ba77953d8.jpg",
placeholder: (context, url) => const Center(
child: SizedBox(
width: 40,
height: 40,
child: CircularProgressIndicator()
),
)
)),
Padding(
padding: const EdgeInsets.fromLTRB(20, 10, 20, 10),
child: SizedBox(
height: 60,
child: ElevatedButton.icon(
onPressed: () {
Navigator.push(context,
MaterialPageRoute(builder: (context) => ArticleList(Articles.FetchAll()))
);
},
icon: const Icon(Icons.description),
label: const Text("Makaleler")
),
child: Row(
children: [
Expanded(
flex: 1,
child: AspectRatio(
aspectRatio: 1,
child: ElevatedButton.icon(
onPressed: () {
Navigator.push(context,
MaterialPageRoute(builder: (context) => ArticleList(Articles.FetchAll()))
);
},
icon: const Icon(Icons.description),
label: const Text("Makaleler")
),
),
),
const Padding(padding: EdgeInsets.fromLTRB(10, 0, 10, 0)),
Expanded(
flex: 1,
child: AspectRatio(
aspectRatio: 1,
child: ElevatedButton.icon(
onPressed: () {
Navigator.push(context,
MaterialPageRoute(builder: (context) => const Report())
);
},
icon: const Icon(Icons.analytics),
label: const Text("Araştırma Raporu")
),
),
),
],
)
),

Padding(
padding: const EdgeInsets.fromLTRB(20, 10, 20, 10),
child: SizedBox(
height: 60,
child: ElevatedButton.icon(
onPressed: () {
Navigator.push(context,
MaterialPageRoute(builder: (context) => const Report())
);
},
icon: const Icon(Icons.analytics),
label: const Text("Araştırma Raporu")
),
child: Row(
children: [
Expanded(
flex: 1,
child: AspectRatio(
aspectRatio: 1,
child: ElevatedButton.icon(
onPressed: () {
Navigator.push(context,
MaterialPageRoute(builder: (context) => ArticleList(Articles.FetchAll()))
);
},
icon: const Icon(Icons.article),
label: const Text("TÜBİTAK Başvuru Makalemiz")
),
),
),
const Padding(padding: EdgeInsets.fromLTRB(10, 0, 10, 0)),
Expanded(
flex: 1,
child: AspectRatio(
aspectRatio: 1,
child: ElevatedButton.icon(
onPressed: () {
Navigator.push(context,
MaterialPageRoute(builder: (context) => const Report())
);
},
icon: const Icon(Icons.dashboard),
label: const Text("eTwinning Projemiz")
),
),
),
],
)
),

Padding(
padding: const EdgeInsets.fromLTRB(20, 10, 20, 10),
child: SizedBox(
Expand Down
17 changes: 13 additions & 4 deletions lib/navbar.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import 'package:flutter/material.dart';
import 'package:read_math/styles.dart';
import 'package:read_math/main.dart';
import 'package:read_math/about_us.dart';
import 'research_report.dart';
import 'article_list.dart';
import 'articles_for_Read_Math.dart';
import 'main.dart';
//int currentPageIndex = 0;

/*class Stack<E> { // copy-pasted from Stack Overflow
Expand All @@ -25,27 +25,31 @@ class NavBar extends StatelessWidget{
const NavBar({Key? key}) : super(key: key);

void pageLoader(BuildContext context, int pageIndex){
Navigator.pop(context);
switch(pageIndex){
case 0:
Navigator.pop(context);
Navigator.push(context,
MaterialPageRoute(builder: (context) => ArticleList(Articles.FetchAll()))
);
break;

case 1:
Navigator.pop(context);
Navigator.push(context,
MaterialPageRoute(builder: (context) => const AboutUs())
);
break;

case 2:
Navigator.pop(context);
Navigator.push(context,
MaterialPageRoute(builder: (context) => const Report())
);
break;

case 3:
Navigator.push(context,
MaterialPageRoute(builder: (context) => const HomeScreen())
);
break;
}
}

Expand All @@ -66,6 +70,11 @@ class NavBar extends StatelessWidget{
)
)
),
ListTile(
leading: const Icon(Icons.home),
title: const Text("Ana Sayfa", style: Styles.textDefault),
onTap: () => pageLoader(context, 3)
),
ListTile(
leading: const Icon(Icons.description),
title: const Text("Makaleler", style: Styles.textDefault),
Expand Down
37 changes: 19 additions & 18 deletions lib/research_report.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,24 @@ class Report extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Container(
padding: const EdgeInsets.fromLTRB(20, 20, 20, 10),
child: const Text(
"Projenin TÜBİTAK 2204 - A Lise Öğrencileri Araştırma Projeleri Yarışması'na sunulmuş olan metnine aşağıdaki butondan ulaşılabilir.",
style: Styles.textDefault,
)
),
Container(
padding: const EdgeInsets.fromLTRB(40, 10, 40, 10),
child: ElevatedButton.icon(
icon: const Icon(Icons.article),
onPressed: () {
launch("https://docs.google.com/document/d/1b4dbQ8typFCjIEH6idPgCxScD_j3kZ_saXFL8j_5xug"); //launch is from url_launcher package to launch URL
},
label: const Text("Proje metnini görüntüle")
)
),

Container(
padding: const EdgeInsets.fromLTRB(20, 20, 20, 10),
child: const Text(
Expand Down Expand Up @@ -76,24 +94,7 @@ class Report extends StatelessWidget {
indent: 10,
endIndent: 10,
)
),
Container(
padding: const EdgeInsets.fromLTRB(20, 20, 20, 10),
child: const Text(
"Projenin TÜBİTAK 2204 - A Lise Öğrencileri Araştırma Projeleri Yarışması'na sunulmuş olan metnine aşağıdaki butondan ulaşılabilir.",
style: Styles.textDefault,
)
),
Container(
padding: const EdgeInsets.fromLTRB(40, 10, 40, 10),
child: ElevatedButton.icon(
icon: const Icon(Icons.article),
onPressed: () {
launch("https://docs.google.com/document/d/1b4dbQ8typFCjIEH6idPgCxScD_j3kZ_saXFL8j_5xug"); //launch is from url_launcher package to launch URL
},
label: const Text("Proje metnini görüntüle")
)
),
)
]
)
)
Expand Down

0 comments on commit f5e58b9

Please sign in to comment.