Skip to content

Instantly share code, notes, and snippets.

@imaNNeo
Last active September 3, 2021 00:14
Show Gist options
  • Save imaNNeo/1b5e3e183d8edd084f3c0389878e8b3e to your computer and use it in GitHub Desktop.
Save imaNNeo/1b5e3e183d8edd084f3c0389878e8b3e to your computer and use it in GitHub Desktop.
Flutter4Fun.com - UI Challenge 6
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)
),
),
);
}
}
@imaNNeo
Copy link
Author

imaNNeo commented Sep 2, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment