🧑🏫Урок 1: Основные виджеты Flutter
Scaffold

// Some code
import 'package:flutter/material.dart';
class ScaffoldWidget extends StatelessWidget {
const ScaffoldWidget({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
backgroundColor: Colors.red,
floatingActionButton: FloatingActionButton(
onPressed: () { },
child: const Icon(Icons.add),
),
body: Center(
child: Container(
height: 100,
width: 100,
color: Colors.white,
),
),
bottomNavigationBar: BottomNavigationBar(
items: const [
BottomNavigationBarItem(icon: Icon(Icons.home), label: 'Home'),
BottomNavigationBarItem(icon: Icon(Icons.print), label: 'Print'),
BottomNavigationBarItem(icon: Icon(Icons.person), label: 'Profile'),
],
),
);
}
}Last updated