Skip to content

Instantly share code, notes, and snippets.

@Reprevise
Created December 21, 2019 16:55
Show Gist options
  • Save Reprevise/431fcd9a1ea5748a82506f13be042e85 to your computer and use it in GitHub Desktop.
Save Reprevise/431fcd9a1ea5748a82506f13be042e85 to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: MyAppOne(),
);
}
}
class MyAppOne extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyAppOne> {
@override
void initState() {
super.initState();
_fetchThings();
}
void _fetchThings() async {
await Future.delayed(Duration(seconds: 10));
print("HI");
}
@override
Widget build(BuildContext context) {
return Center(child: CircularProgressIndicator());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment