Created
February 7, 2024 16:57
-
-
Save mohn93/0240347dbfa0b77aa759153ba8bca519 to your computer and use it in GitHub Desktop.
Lecture 3 lab 2
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 App()); | |
} | |
class App extends StatelessWidget { | |
const App({super.key}); | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
home: Scaffold( | |
appBar: AppBar( | |
centerTitle: false, | |
title: const Text('Android Cafe'), | |
), | |
body: Column( | |
children: [ | |
Card( | |
elevation: 16, | |
child: Container( | |
decoration: BoxDecoration( | |
borderRadius: BorderRadius.circular(16), | |
), | |
clipBehavior: Clip.hardEdge, | |
child: Column( | |
children: [ | |
Image.network( | |
'https://upload.wikimedia.org/wikipedia/commons/thumb/b/b6/Image_created_with_a_mobile_phone.png/440px-Image_created_with_a_mobile_phone.png', | |
width: double.infinity, | |
height: 200, | |
fit: BoxFit.cover, | |
), | |
Padding( | |
padding: const EdgeInsets.all(8.0), | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
Text('UI/UX Design'), | |
Row( | |
children: [ | |
Container( | |
decoration: BoxDecoration(shape: BoxShape.circle), | |
clipBehavior: Clip.antiAlias, | |
child: Image.network( | |
'https://upload.wikimedia.org/wikipedia/commons/thumb/a/a8/TEIDE.JPG/440px-TEIDE.JPG', | |
height: 16, | |
width: 16, | |
fit: BoxFit.cover, | |
), | |
), | |
SizedBox( | |
width: 8, | |
), | |
Text( | |
'Don Norman', | |
style: | |
TextStyle(fontSize: 12, color: Colors.grey), | |
), | |
], | |
) | |
], | |
), | |
) | |
], | |
), | |
), | |
), | |
], | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment