Open berkeresvan opened 7 months ago
import 'package:flutter/material.dart'; import 'package:sayfagecisuygulamasi/sayfaaB.dart';
class SayfaA extends StatefulWidget { const SayfaA({super.key});
@override
State
class _SayfaAState extends State
import 'package:flutter/material.dart'; import 'package:sayfagecisuygulamasi/main.dart';
class SayfaB extends StatefulWidget { const SayfaB({super.key});
@override
State
Future
class _SayfaBState extends State
// ignore_for_file: public_member_api_docs, sort_constructors_first import 'package:flutter/material.dart';
import 'package:sayfagecisuygulamasi/sayfaA.dart';
void main() { runApp(const MyApp()); }
class MyApp extends StatelessWidget { const MyApp({super.key});
@override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', theme: ThemeData( colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), useMaterial3: true, ), home: Anasayfa(), ); } }
class Anasayfa extends StatefulWidget { @override State createState() => _AnasayfaState();
}
class _AnasayfaState extends State {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
title: Text("Anaasayfa"),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
ElevatedButton(
onPressed: () {
Navigator.push(context,
MaterialPageRoute(builder: (context) => SayfaA()));
},
child: Text("Sayfa A git")),
],
),
),
);
}
}