Created with <3 with dartpad.dev.
Created
August 20, 2023 22:45
-
-
Save Lootwig/9fe057209798eea5fcd1edd2c20aa816 to your computer and use it in GitHub Desktop.
xenial-rose-4702
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(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Material App', | |
// theme: ThemeData.dark(), | |
home: Home(), | |
); | |
} | |
} | |
class Home extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: Text('Material App Bar'), | |
), | |
body: AnimatedRotation( | |
duration: const Duration(milliseconds: 500), | |
turns: .25, | |
child: OverflowBox( | |
maxWidth: double.infinity, | |
maxHeight: double.infinity, | |
alignment: Alignment.center, | |
child: SizedBox( | |
width: MediaQuery.of(context).size.height, | |
height: MediaQuery.of(context).size.width, | |
child: Center( | |
child: Stack( | |
children: [ | |
AspectRatio( | |
aspectRatio: 16 / 9, | |
child: SizedBox.expand(child: Placeholder()), | |
), | |
Positioned( | |
top: 32, | |
left: 32, | |
child: IconButton( | |
onPressed: () => print('tap'), | |
icon: Icon(Icons.close), | |
), | |
), | |
], | |
), | |
), | |
), | |
), | |
), | |
floatingActionButton: FloatingActionButton( | |
child: Icon(Icons.add), | |
onPressed: () {}, | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment