Skip to content

Instantly share code, notes, and snippets.

@omarzer0
Created December 15, 2022 17:03
Show Gist options
  • Save omarzer0/56ecb16ee0698705118e4470d60b8cb8 to your computer and use it in GitHub Desktop.
Save omarzer0/56ecb16ee0698705118e4470d60b8cb8 to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(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