Created
December 15, 2022 17:03
-
-
Save omarzer0/0f1b669edd880fa99a598c9dde0d962d to your computer and use it in GitHub Desktop.
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( | |
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