Created
December 15, 2022 17:03
-
-
Save omarzer0/56ecb16ee0698705118e4470d60b8cb8 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(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