Atividade_flutter_3
Atividade_flutter_3
# included with your application, so that you can use the icons in
uses-material-design: true
assets:
- img/mulher.jpg
- img/psg.jpg
Exercício 1
import 'package:flutter/material.dart';
MaterialApp(
home: Home(),
debugShowCheckedModeBanner: false,
),
);
@override
return Scaffold(
appBar: AppBar(
),
body: Center(
child: Container(
width: 300,
height: 300,
decoration: BoxDecoration(
boxShadow: const [
BoxShadow(
color: Colors.grey,
spreadRadius: 2,
blurRadius: 5,
),
],
),
child: Center(
child: Container(
width: 150,
height: 150,
decoration: BoxDecoration(
),
child: Image.asset(
'/img/ps.jpg',
width: 100,
height: 100,
fit: BoxFit.cover,
),
),
),
),
),
onPressed: null,
child: Icon(Icons.add),
),
);
Exercício 2
import 'package:flutter/material.dart';
home: Home(),
debugShowCheckedModeBanner: false,
),
);
@override
return Scaffold(
appBar: AppBar(
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
height: 200,
width: 200,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(7),
image: AssetImage('/img/mulher.jpg'),
fit: BoxFit.cover,
),
boxShadow: const [
BoxShadow(
color: Colors.grey,
spreadRadius: 2,
blurRadius: 5,
),
],
),
),
Container(
height: 200,
width: 200,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(7),
image: AssetImage('/img/psg.jpg'),
fit: BoxFit.cover,
),
boxShadow: const [
BoxShadow(
color: Colors.grey,
spreadRadius: 2,
blurRadius: 5,
),
],
),
),
],
),
),
onPressed: null,
tooltip: "Exemplo de botão",
child: Icon(Icons.add),
),
);
Exercicio 3
import 'package:flutter/material.dart';
MaterialApp(
home: Home(),
debugShowCheckedModeBanner: false,
),
);
class Home extends StatelessWidget {
@override
return Scaffold(
appBar: AppBar(
),
body: Center(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
height: 200,
width: 200,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(7),
image: AssetImage('/img/mulher.jpg'),
fit: BoxFit.cover,
),
boxShadow: const [
BoxShadow(
color: Colors.grey,
spreadRadius: 2,
blurRadius: 5,
),
],
),
),
SizedBox(width: 20), // Espaço entre as imagens na horizontal
Container(
height: 200,
width: 200,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(7),
image: AssetImage('/img/psg.jpg'),
fit: BoxFit.cover,
),
boxShadow: const [
BoxShadow(
color: Colors.grey,
spreadRadius: 2,
blurRadius: 5,
),
],
),
),
],
),
),
onPressed: null,
child: Icon(Icons.add),
),
);