I'm a beginner at flutter. I'm practicing to make in Scaffold. In my code, the last area that Sized Box has errors in child and elevation, and color. I don't understand why they are used in not correctly, Could you explain that to me?
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
home:Scaffold(
appBar: AppBar(
backgroundColor: Colors.white,
leading: IconButton(
icon: Icon(Icons.menu, color: Colors.pink,),
onPressed: () {
print("menu button is clicked");
}
),
title: IconButton(
onPressed: () { print("이미지버튼 동작"); },
icon: Image.asset('assets/images/Slimer_by_shinrider-dcqaiza.webp')),
),
body: Container(
width: 100,
height: 200,
margin: EdgeInsets.all(5.0),
decoration: BoxDecoration(
color: Colors.pinkAccent,
border: Border.all(color: Colors.purple)
),
),
child: SizedBox(
height: 80, width: 100,
child: Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16.0)
),
),
elevation: 4.0,
color: Colors.red
)
)
);
}
}
