Skip to content

Instantly share code, notes, and snippets.

@imaNNeo
Last active September 3, 2021 00:13
Show Gist options
  • Save imaNNeo/eee68a4f329d16b170b1363beca083ab to your computer and use it in GitHub Desktop.
Save imaNNeo/eee68a4f329d16b170b1363beca083ab 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: Stack(
children: [
Container(
decoration: BoxDecoration(color: Color(0xFFDC691F), borderRadius: BorderRadius.circular(24)),
),
Row(
children: [
Expanded(child: Placeholder()),
SizedBox(
width: 120,
child: Image.network(
"https://flutter4fun.com/wp-content/uploads/2021/09/juice2.png",
),
)
],
)
],
),
);
}
}
@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