Skip to content

Instantly share code, notes, and snippets.

@omarzer0
Created December 15, 2022 17:03
Show Gist options
  • Save omarzer0/0f1b669edd880fa99a598c9dde0d962d to your computer and use it in GitHub Desktop.
Save omarzer0/0f1b669edd880fa99a598c9dde0d962d to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
debugShowCheckedModeBanner: false,
home: Screen(),
),
);
}
class Screen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
body: Column(
children: [
ElevatedButton(
onPressed: () {
Future.delayed(Duration(seconds: 3), () {
print('Task finished');
});
},
child: Text('Like')),
ElevatedButton(
onPressed: () => print('Back Pressed'), child: Text('Back')),
],
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment