Skip to content

Instantly share code, notes, and snippets.

@epsi95
Created December 31, 2020 11:24
Show Gist options
  • Save epsi95/f8b1285b30f1c2ff064cdd1f1fdd7b65 to your computer and use it in GitHub Desktop.
Save epsi95/f8b1285b30f1c2ff064cdd1f1fdd7b65 to your computer and use it in GitHub Desktop.
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