This file contains hidden or 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
| import 'package:flutter/material.dart'; | |
| void main() { | |
| runApp( | |
| MaterialApp( | |
| debugShowCheckedModeBanner: false, | |
| routes: { | |
| "/": (context) => Sayfa1(), | |
| "/sayfa2": (context) => Sayfa2(data: <String, String>{ | |
| "user": "ali", |
This file contains hidden or 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
| import 'package:flutter/material.dart'; | |
| void main() { | |
| runApp( | |
| MaterialApp( | |
| debugShowCheckedModeBanner: false, | |
| onGenerateRoute: Rotalar.generateRoute, | |
| ), | |
| ); | |
| } |
This file contains hidden or 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
| class Rotalar { | |
| static Route<dynamic> generateRoute(RouteSettings settings) { | |
| // .pushNamed ile gelen argumentleri alıyoruz. | |
| final Map<String, String> args = settings.arguments; | |
| switch (settings.name) { | |
| case "/": | |
| return MaterialPageRoute(builder: (context) => Sayfa1()); | |
| case "/sayfa2": |
This file contains hidden or 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
| void main() { | |
| runApp( | |
| MaterialApp( | |
| debugShowCheckedModeBanner: false, | |
| initialRoute: '/', | |
| routes: { | |
| '/': (context) => Sayfa1(), | |
| '/sayfa2': (context) => Sayfa2(data: "sabit data"), |
This file contains hidden or 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
| import 'package:flutter/material.dart'; | |
| void main() { | |
| runApp( | |
| MaterialApp(debugShowCheckedModeBanner: false, home: Sayfa1()), | |
| ); | |
| } | |
| class Sayfa1 extends StatelessWidget { | |
| // Burası List veya Map olabilmektedir. |
NewerOlder