Created
January 28, 2024 15:39
-
-
Save AlejoCumpa/0bc540988ad287e02f53662a89c40d76 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
class Demo extends StatefulWidget { | |
const Demo({super.key}); | |
@override | |
State<Demo> createState() => _DemoState(); | |
} | |
class _DemoState extends State<Demo> { | |
late Size? screenSize; | |
@override | |
void didChangeDependencies() { | |
super.didChangeDependencies(); | |
screenSize = MediaQuery.of(context).size; | |
} | |
@override | |
void initState() { | |
super.initState(); | |
} | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: const Text("Demo"), | |
), | |
body: Center( | |
child: Padding( | |
padding: const EdgeInsets.all(12.0), | |
child: ButtonCircle(width: screenSize!.width * 0.8), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment