👨‍💻
Flutter
  • 👨‍💻Flutter lessons
    • 🎨Flutter ui
      • 🚵‍♂️Travel app
        • 📱1. Lesson
        • 📱2.Lesson
      • 📚Books store
      • 🧑‍⚕️Doctor app
      • 🚖Taxi app
    • 🐦Основы Flutter
      • Page 1
      • Page 2
      • 🧑‍🏫Урок 1: Основные виджеты Flutter
        • Page
        • 🧩Container()
        • 🧩AppBar()
        • 🧩Text()
        • 🧩Icon()
        • 🧩Column()
        • 🧩Row()
        • 🧩TextButton()
        • 🧩ElevatedButton()
      • 🧑‍🏫Урок 2: Создаем UI
      • 🧑‍🏫Урок 3: Создаем UI
      • 🧑‍🏫Урок 4: Создаем UI
    • 🧩Основы dart
      • 🧑‍🏫01. Переменные часть 1
      • 🧑‍🏫01. Переменные часть 2
      • 🧑‍🏫02. Функции
      • 🧑‍🏫03. Условные операторы
      • 🧑‍🏫04. List
      • 🧑‍🏫05. Map
      • 🧑‍🏫06. Class
      • 🧑‍🏫07. Наследование
      • 🧑‍🏫08. Абстракция
      • 🧑‍🏫09. Интерфейсы
      • 🧑‍🏫10. Инкапсуляция
      • 🧑‍🏫11. Mixin
      • 🧑‍🏫12. Асинхронное программирование
      • 🧑‍🏫13. Streams
      • 🎯Final project
        • 🥦Grocery app
        • 🏠Home
    • ⚒️State management
      • ⬛Bloc
        • 1. Введение cubit
          • 1.1 Пример
          • 1.2 Пример
          • 1.3 Пример
          • 1.4 Пример
          • 1.5 Пример
        • 2. Введение в Bloc
      • 🌊Riverpod
    • 🏠Architechture
      • Clean Architechture
      • Bloc
    • 📲Locale storage
      • 🐝Hive
        • 🐝Ui
        • 🐝Hive - локальное хранилище: Введение
        • 🐝Hive - task app: часть 1
        • 🐝Hive - task app: часть 2
        • 🐝Hive - task app: часть 3
        • 🐝Hive - task app: часть 4
        • 🐝Hive - task app: часть 5
      • 🟩Sql
    • 📡Server
      • 📡Server - Lesson01 introduction
      • 📡Server - Lesson02 get data
      • 📡Server - Lesson03 News App get data
    • 🖥️Готовый backend
      • Firebase
      • Supabase
  • 🎯Dart practise
    • 🧑‍💻Переменные
      • 🧑‍💻String
      • 🧑‍💻int
      • 🧑‍💻double
      • 🧑‍💻bool
    • 🧑‍💻Функции
      • 🧑‍💻Обычные функции
      • 🧑‍💻Порядковые параметры
      • 🧑‍💻Обязательные параметры
      • 🧑‍💻Параметры по умолчанию
      • 🧑‍💻Функции-стрелки
      • 🧑‍💻Возвращаемые функции
    • 🧑‍💻Условные операторы
      • 🧑‍💻if/else
      • 🧑‍💻switch/case
      • 🧑‍💻тернарный оператор
    • 🧑‍💻Структура данных
      • 🧑‍💻List
      • 🧑‍💻Map
      • 🧑‍💻Set
    • 🧑‍💻ООП
  • 🧩Flutter Widgets
    • 💻Все виджеты
    • 🎞️Анимации
      • 🧩AnimatedContainer
      • 🧩AnimatedOpacity
      • 🧩AnimatedAlign
      • 🧩AnimatedCrossFade
      • 🧩Hero
      • 🧩AnimatedBuilder
      • 🧩AnimatedPositioned
      • 🧩AnimatedSwitcher
    • 🏗️Манипуляция пространством
      • 🧩Padding
      • 🧩SizedBox
      • 🧩Align
      • 🧩Center
      • 🧩Expanded
      • 🧩Flexible
      • 🧩Spacer
      • 🧩Column
      • 🧩Stack
      • 🧩Row
    • ✍️Отображение текста
      • 🧩RichText
      • 🧩FittedBox
      • 🧩SelectableText
      • 🧩Text
    • 📸Отображение изображений
      • 🧩Image()
      • 🧩Image.network
      • 🧩Image.asset
      • 🧩Image.file
      • 🧩Image.memory
      • 🧩FadeInImage
      • 🧩NetworkImage
      • 🧩AssetImage
    • 📃Списки и прокрутка
      • 🧩ListView()
      • 🧩ListView.builder()
      • 🧩GridView()
      • 🧩GridView.builder()
      • 🧩PageView()
      • 🧩SingleChildScrollView
      • 🧩CustomScrollView
      • 🧩ReorderableListView
      • 🧩NestedScrollView
    • ⌨️Кнопки
      • 🧩TextButton()
      • 🧩ElevatedButton()
      • 🧩IconButton()
      • 🧩DropDownButton()
      • 🧩FloatingActionButton
      • 🧩Checkbox
      • 🧩Radio
      • 🧩Switch
      • 🧩Slider
    • 📝Формы и ввод данных
      • 🧩TextField()
      • 🧩TextFormField
      • 🧩Form
      • 🧩FormField
      • 🧩DatePicker
      • 🧩TimePicker
    • 🧑‍🏫Диалоги и всплывающие окна
      • 🧩AlertDialog
      • 🧩SimpleDialog
      • 🧩BottomSheet
      • 🧩ExpansionPanel
      • 🧩SnackBar
      • 🧩PopupMenuButton
      • 🧩Tooltip
      • 🧩Dialog
    • 🛣️Навигация
      • 🧩BottomNavigationBar()
      • 🧩Navigator
      • 🧩Drawer
      • 🧩TabBar
    • 📱Отображение на экране
      • 🧩Scaffold
      • 🧩Container()
      • 🧩AppBar()
      • 🧩Icon()
      • 🧩Stepper()
  • 🎮Flutter Flame
    • Введение в разработку игр
  • 🔬Flutter projects
  • 🧑‍🎓Homeworks for everyday
    • 🧑‍🎓0. Переменные
    • 🧑‍🎓1. Функции - 1
    • 🧑‍🎓2. Функции - 2
    • 🧑‍🎓3. Условные операторы
    • 🧑‍🎓4. List
    • 🧑‍🎓5. Map
    • 🧑‍🎓6. class
    • 🐝Hive -
    • 🐝Hive clean architecture
    • 📡HTTP
    • 📡HTTP clean architecture
    • 💾Firebase
    • 💾Firebase clean architecture
Powered by GitBook
On this page
  1. Flutter lessons
  2. Основы Flutter

Урок 3: Создаем UI

PreviousУрок 2: Создаем UINextУрок 4: Создаем UI

Last updated 7 months ago

// Some code
import 'package:flutter/material.dart';


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

  @override
  Widget build(BuildContext context) {
    // Scaffold создает экран
    return Scaffold(
      // меняте цвет экрана
      backgroundColor: const Color(0xFFdbe4f3),
      //Padding создает пустое пространства вокруг виджета
      body: Padding(
        padding: const EdgeInsets.only(left: 15, right: 15, top: 38),
        // Column принимает детей или виджетов сверху вниз
        child: Column(
          children: [
            // Созадет квадратный контейнер
            Container(
              margin: const EdgeInsets.only(bottom: 15), // Вокруг контейнера создает пустое пространства
              width: double.infinity, // ширина контейнера
              height: 300, // высота контейнера
              decoration: BoxDecoration(
                color: Colors.white, // если создаем decoration цвет пишем внутри скобок Boxdecoration
                borderRadius: BorderRadius.circular(30), // делает контейнер круглым
              ),
              // сhild принимает однин виджет, в данном случае Column -
              // Но вы может вместо column использовать любой другой виджет
              child: Column(
                children: [
                  // Row принимает виджетов слева направо
                  Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: [
                      // Иконка кнопка
                      IconButton(
                          onPressed: () {
                            
                          
                          }, // { внутри этих скобок мы будем писать логику этой кнопки}
                          icon: const Icon(Icons.menu),),
                      IconButton(
                          onPressed: () {}, icon: const Icon(Icons.more_vert)),
                    ],
                  ),
                  // CircleAvatar Создает круглый аватар
                  const CircleAvatar(
                    radius: 50, // размер круглого аватара
                  ),
                  // создает пустое пространства
                  const SizedBox(
                    height: 20,
                  ),
                  const Text(
                    'Hira Riaz',
                    style: TextStyle(
                        fontSize: 20,
                        fontWeight: FontWeight.bold,
                        color: Colors.indigo),
                  ),
                  const Text('Ux/Ui designer'),
                  const SizedBox(
                    height: 20,
                  ),
                  const Row(
                    mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                    children: [
                      Column(
                        crossAxisAlignment: CrossAxisAlignment.start,
                        children: [
                          Text(
                            '8900',
                            style: TextStyle(
                                fontSize: 17,
                                fontWeight: FontWeight.w600,
                                color: Colors.indigo),
                          ),
                          Text('Income')
                        ],
                      ),
                      Column(
                        crossAxisAlignment: CrossAxisAlignment.start,
                        children: [
                          Text(
                            '5500',
                            style: TextStyle(
                                fontSize: 17,
                                fontWeight: FontWeight.w600,
                                color: Colors.indigo),
                          ),
                          Text('Expenses')
                        ],
                      ),
                      Column(
                        crossAxisAlignment: CrossAxisAlignment.start,
                        children: [
                          Text(
                            '890',
                            style: TextStyle(
                                fontSize: 17,
                                fontWeight: FontWeight.w600,
                                color: Colors.indigo),
                          ),
                          Text('Loan')
                        ],
                      ),
                    ],
                  )
                ],
              ),
            ),
            Row(
              children: [
                const Text(
                  'Overview',
                  style: TextStyle(
                      fontSize: 20,
                      fontWeight: FontWeight.bold,
                      color: Colors.indigo),
                ),
                const Icon(Icons.notification_add),
                Expanded(child: Container()),
                const Text(
                  'Sep 13, 2020',
                  style: TextStyle(
                      fontSize: 17,
                      fontWeight: FontWeight.w600,
                      color: Colors.indigo),
                )
              ],
            ),
            Container(
              margin: const EdgeInsets.only(bottom: 10, top: 20),
              width: double.infinity,
              height: 100,
              decoration: BoxDecoration(
                color: Colors.white,
                borderRadius: BorderRadius.circular(30),
              ),
              child: Center(
                child: ListTile(
                  leading: Container(
                    height: 100,
                    width: 60,
                    decoration: BoxDecoration(
                        color: const Color(0xFFdbe4f3),
                        borderRadius: BorderRadius.circular(20)
                    ),
                    child: const Center(
                      child: Icon(
                        Icons.arrow_upward, size: 30, color: Colors.black,),
                    ),
                  ),
                  title: const Text('sent', style: TextStyle(
                      fontSize: 20,
                      fontWeight: FontWeight.w700,
                      color: Colors.black),),
                  subtitle: const Text(
                    'sending payment to clients', style: TextStyle(
                      fontSize: 15,
                      //fontWeight: FontWeight.bold,
                      color: Colors.grey),),
                  trailing: const Text('150',  style: TextStyle(
                      fontSize: 15,
                      fontWeight: FontWeight.w700,
                      color: Colors.black),),
                ),
              ),
            ),
            Container(
              margin: const EdgeInsets.only(bottom: 10, top: 10),
              width: double.infinity,
              height: 100,
              decoration: BoxDecoration(
                color: Colors.white,
                borderRadius: BorderRadius.circular(30),
              ),
              child: Center(
                child: ListTile(
                  leading: Container(
                    height: 100,
                    width: 60,

                    decoration: BoxDecoration(
                        color: const Color(0xFFdbe4f3),
                        borderRadius: BorderRadius.circular(20)
                    ),
                    child: const Center(
                      child: Icon(
                        Icons.arrow_upward, size: 30, color: Colors.black,),
                    ),
                  ),
                  title: const Text('sent', style: TextStyle(
                      fontSize: 20,
                      fontWeight: FontWeight.w700,
                      color: Colors.black),),
                  subtitle: const Text(
                    'sending payment to clients', style: TextStyle(
                      fontSize: 15,
                      //fontWeight: FontWeight.bold,
                      color: Colors.grey),),
                  trailing: const Text('150',  style: TextStyle(
                      fontSize: 15,
                      fontWeight: FontWeight.w700,
                      color: Colors.black),),
                ),
              ),
            ),
            Container(
              margin: const EdgeInsets.only(bottom: 10, top: 10),
              width: double.infinity,
              height: 100,
              decoration: BoxDecoration(
                color: Colors.white,
                borderRadius: BorderRadius.circular(30),
              ),
              child: Center(
                child: ListTile(
                  leading: Container(
                    height: 100,
                    width: 60,

                    decoration: BoxDecoration(
                        color: const Color(0xFFdbe4f3),
                        borderRadius: BorderRadius.circular(20)
                    ),
                    child: const Center(
                      child: Icon(
                        Icons.arrow_upward, size: 30, color: Colors.black,),
                    ),
                  ),
                  title: const Text('sent', style: TextStyle(
                      fontSize: 20,
                      fontWeight: FontWeight.w700,
                      color: Colors.black),),
                  subtitle: const Text(
                    'sending payment to clients', style: TextStyle(
                      fontSize: 15,
                      //fontWeight: FontWeight.bold,
                      color: Colors.grey),),
                  trailing: const Text('150',  style: TextStyle(
                      fontSize: 15,
                      fontWeight: FontWeight.w700,
                      color: Colors.black),),
                ),
              ),
            ),

          ],
        ),
      ),
    );
  }
}
👨‍💻
🐦
🧑‍🏫