Created
December 31, 2020 11:24
-
-
Save epsi95/f8b1285b30f1c2ff064cdd1f1fdd7b65 to your computer and use it in GitHub Desktop.
This file contains hidden or 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'; | |
import 'package:wormmovementanimation/worm_animation_button.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
void buttonPressed(String buttonName) { | |
print('$buttonName is pressed!'); | |
} | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
home: SafeArea( | |
child: Scaffold( | |
backgroundColor: Colors.black54, | |
body: WormAnimationButton( | |
animationDuration: const Duration(milliseconds: 500), | |
buttonPressedCallBack: buttonPressed, | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment