Created
December 16, 2022 09:40
-
-
Save just1984/2d238208f78a1b0707a342a14757a4ed to your computer and use it in GitHub Desktop.
homeworkcontainer
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'; | |
void main() { | |
runApp(const ContainerTestHomework()); | |
} | |
class ContainerTestHomework extends StatelessWidget { | |
const ContainerTestHomework({super.key}); | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Container Test Homework', | |
home: Scaffold( | |
backgroundColor: Color.fromRGBO(0, 50, 101, 1), | |
body: Center( | |
child: | |
Column(mainAxisAlignment: MainAxisAlignment.center, children: [ | |
// Container( | |
// child: ButtonBar( | |
// alignment: MainAxisAlignment.center, | |
// children: [ | |
// ElevatedButton( | |
// onPressed: () {}, | |
// child: const Text("Let's go!"), | |
// ), | |
// ], | |
// ), | |
// ), | |
Container( | |
height: 150, | |
decoration: const BoxDecoration( | |
image: DecorationImage( | |
image: NetworkImage( | |
'https://media.tenor.com/2roX3uxz_68AAAAM/cat-space.gif'), | |
fit: BoxFit.cover, | |
), | |
), | |
), | |
])), | |
), | |
); | |
} | |
} | |
// void nyancat() { | |
// runApp(nyan()); | |
// } | |
// class nyan extends StatelessWidget { | |
// @override | |
// Widget build(BuildContext context) { | |
// return MaterialApp( | |
// home: Scaffold( | |
// body: Center( | |
// child: FlatButton( | |
// onPressed: () { | |
// final player = AudioCache(); | |
// player.play('https://www.myinstants.com/media/sounds/nyan-cat_1.mp3'); | |
// }, | |
// child: Text('Play audio'), | |
// ), | |
// ), | |
// ), | |
// ); | |
// } | |
// } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment