Flutter - Dart

3 қатарлы скролл

main.dart

				
					import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: '',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: ThreeColumnsPage(),
    );
  }
}

class ThreeColumnsPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('3 қатарлы скролл'),
      ),
      body: SingleChildScrollView(
        scrollDirection: Axis.horizontal,
        child: Row(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            Column(
              children: [
                ClipRRect(
                  borderRadius: BorderRadius.circular(10),
                  child: Image.network(
                    'https://triplook.me/media/resorts/photo/2/9/qu1.jpg',
                    height: 200,
                    fit: BoxFit.cover,
                  ),
                ),
                SizedBox(height: 8),
                Text('Колонна 1'),
              ],
            ),
            SizedBox(width: 16),
            Column(
              children: [
                ClipRRect(
                  borderRadius: BorderRadius.circular(10),
                  child: Image.network(
                    'https://triplook.me/media/resorts/photo/2/9/qu1.jpg',
                    height: 200,
                    fit: BoxFit.cover,
                  ),
                ),
                SizedBox(height: 8),
                Text('Колонна 2'),
              ],
            ),
            SizedBox(width: 16),
            Column(
              children: [
                ClipRRect(
                  borderRadius: BorderRadius.circular(10),
                  child: Image.network(
                    'https://triplook.me/media/resorts/photo/2/9/qu1.jpg',
                    height: 200,
                    fit: BoxFit.cover,
                  ),
                ),
                SizedBox(height: 8),
                Text('Колонна 3'),
              ],
            ),
          ],
        ),
      ),
    );
  }
}