Last active
September 3, 2021 00:14
-
-
Save imaNNeo/1b5e3e183d8edd084f3c0389878e8b3e to your computer and use it in GitHub Desktop.
Flutter4Fun.com - UI Challenge 6
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(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
theme: ThemeData( | |
brightness: Brightness.light | |
), | |
debugShowCheckedModeBanner: false, | |
home: MyHomePage(), | |
); | |
} | |
} | |
class MyHomePage extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: Text("flutter4fun.com"), | |
), | |
body: Center( | |
child: Padding( | |
padding: const EdgeInsets.all(20.0), | |
child: JuiceWidget(), | |
), | |
), | |
); | |
} | |
} | |
class JuiceWidget extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return AspectRatio( | |
aspectRatio: 1.25, | |
child: Container( | |
decoration: BoxDecoration( | |
color: Color(0xFFDC691F), | |
borderRadius: BorderRadius.circular(24) | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://flutter4fun.com/ui-challenge-6