yasintuncel bak mesela bunda bile dedi
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: ‘Flutter demo’,
home: AnaSayfa(),
);
}
}
class AnaSayfa extends StatefulWidget {
@override
_AnaSayfaState createState() => _AnaSayfaState();
}
class _AnaSayfaState extends State<AnaSayfa> {
PageController myController;
@override
void initState() {
// TODO: implement initState
super.initState();
myController = PageController(initialPage: 0, keepPage: true, viewportFraction: 1 );
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(“fluttterr”),
),
body: Column(
children: <Widget>[
Expanded(child: Container(height: 200, color: Colors.lime,)),
Expanded(
child: Container(
height: 200,
color: Colors.orangeAccent,
child: PageView(
scrollDirection: Axis.horizontal,
reverse: false,
controller: myController,
children: <Widget>[
Container(child: Text("a"),),
Container(child: Text("b"),),
Container(child: Text("c"),),
],
),
),
),
],
),
);
}
}
bu yazdı I/Choreographer( 3134): Skipped 30 frames! The application may be doing too much work on its main thread.