Cross-platform mobile framework
Kamil Rykowski
What is it?
Open source framework for building mobile cross platform applications based on Dart.
...more
But why?
do you event lift?
Simple entry point
// main.dart
class App extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Text('my app'),
);
}
}
void main() => runApp(App());Show me the code!
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(
children: [
Text('text 1'),
RaisedButton(
child: Text('press'),
onPressed: () {},
),
],
);
}
}Basics
class MyWidget extends StatefulWidget {
@override
MyState createState() => MyState();
}
class MyState extends State<MyWidget> {
int clickCount = 0;
@override
Widget build(BuildContext context) {
return RaisedButton(
child: Text('counter: $clickCount'),
onPressed: () => setState(() {
clickCount++; }),
);
}
}Advanced
Is it worth it?
?