카테고리 없음

본 캠프 16일 차_ Flutter 학습 및 네트워킹

개발일지27 2025. 3. 24. 20:56

쇼핑몰 앱 만들기

import 'package:flutter/material.dart';

void main() {
runApp(const MyApp());
}

class MyApp extends StatelessWidget {
const MyApp({super.key});

@override
Widget build(BuildContext context) {
return MaterialApp(debugShowCheckedModeBanner: false, home: StorePage());
}
}

class StorePage extends StatelessWidget {
const StorePage({super.key});

@override
Widget build(BuildContext context) {
return Scaffold(
body: SafeArea(
child: Column(
children: [
SizedBox(
height: 70,
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 20),
child: Row(
children: [
Text(
'Woman',
style: TextStyle(fontWeight: FontWeight.bold),
),
Spacer(),
Text('kids', style: TextStyle(fontWeight: FontWeight.bold)),
Spacer(),
Text(
'shoes',
style: TextStyle(fontWeight: FontWeight.bold),
),
Spacer(),
Text('Bag', style: TextStyle(fontWeight: FontWeight.bold)),
Spacer(),
],
),
),
),
Expanded(child: Image.asset('assets/bag.jpg', fit: BoxFit.cover)),
Expanded(child: Image.asset('assets/shoes.jpg', fit: BoxFit.cover)),
],
),
),
);
}
}