selection_area.0.dart 929 Bytes
Newer Older
1 2 3 4 5 6
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter/material.dart';

7
/// Flutter code sample for [SelectionArea].
8

9
void main() => runApp(const SelectionAreaExampleApp());
10

11 12
class SelectionAreaExampleApp extends StatelessWidget {
  const SelectionAreaExampleApp({super.key});
13 14 15 16 17 18

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: SelectionArea(
        child: Scaffold(
19
          appBar: AppBar(title: const Text('SelectionArea Sample')),
20
          body: const Center(
21 22
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
23
              children: <Widget>[
24 25 26 27 28 29 30 31 32 33 34
                Text('Row 1'),
                Text('Row 2'),
                Text('Row 3'),
              ],
            ),
          ),
        ),
      ),
    );
  }
}