This file contains 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(home: MyApp())); | |
class MyApp extends StatelessWidget { | |
static const String _lorenIpsum = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec iaculis orci vel tempor dignissim. Praesent nisl neque, iaculis et euismod ut, dignissim non arcu. In vel convallis mauris, a viverra turpis. Curabitur ac erat pulvinar, mattis nisl eu, placerat risus. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Duis cursus, nisi eu molestie vulputate, libero tellus convallis purus, id cursus sapien orci at velit. Duis placerat et massa et molestie. Quisque id elit blandit, tempor nulla non, faucibus ex. Pellentesque elementum cursus neque, vitae ultricies massa molestie nec. Morbi a eros finibus, sagittis mi eget, gravida.'; | |
@override | |
Widget build(BuildContext context) => Scaffold( |
This file contains 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
const Duration _duration = Duration(seconds:1); | |
const List<String> _list = ['1','2','3','4','5',]; | |
Future<void> _printDelayed(String string) async { | |
await Future.delayed(_duration); | |
print(string); | |
} | |
void main() async { | |
_list.forEach((s) async => await _printDelayed(s)); | |
await Future.delayed(_duration*2); |
This file contains 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 'dart:async'; | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) => MaterialApp( | |
home: MyHomePage(), | |
); |
This file contains 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(home:MyApp())); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) => Scaffold( | |
body: MyHomePage(), | |
); | |
} |
This file contains 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(MyApp(),); | |
class MyApp extends StatefulWidget { | |
@override | |
_MyAppState createState() => _MyAppState(); | |
} | |
ThemeData _theme1 = ThemeData(buttonTheme: ButtonThemeData(textTheme: ButtonTextTheme.normal,),); |
This file contains 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'; | |
import 'package:flutter/scheduler.dart'; | |
void main() { | |
timeDilation = 3.0; | |
runApp(MaterialApp(home: MyHomePage())); | |
} | |
class MyHomePage extends StatefulWidget { | |
@override |
This file contains 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(new MaterialApp(home: MyApp(),),); | |
class MyApp extends StatefulWidget { | |
@override | |
_MyAppState createState() => _MyAppState(); | |
} | |
class _MyAppState extends State<MyApp> with SingleTickerProviderStateMixin { |
This file contains 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(home: MyApp())); | |
class MyApp extends StatefulWidget { | |
@override | |
_MyAppState createState() => _MyAppState(); | |
} | |
class _MyAppState extends State<MyApp>{ |
This file contains 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(home: MyApp())); | |
class MyApp extends StatefulWidget { | |
@override | |
_MyApp createState() => _MyApp(); | |
} | |
class _MyApp extends State<MyApp> with WidgetsBindingObserver{ |
This file contains 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'; | |
import 'package:flutter/services.dart'; | |
void main() => runApp(MaterialApp(home: MyApp())); | |
class MyApp extends StatefulWidget { | |
@override | |
_MyApp createState() => _MyApp(); | |
} |