blob: 69f6e73b4816906c7c85be63b621b768cb91e746 [file] [log] [blame]
chunhtaiefb93682022-05-24 13:53:55 -07001// Copyright 2014 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
chunhtaiefb93682022-05-24 13:53:55 -07005import 'package:flutter/material.dart';
6
Greg Spencere3bc8ef2023-04-04 13:34:29 -07007/// Flutter code sample for [SelectionArea].
chunhtaiefb93682022-05-24 13:53:55 -07008
Greg Spencere3bc8ef2023-04-04 13:34:29 -07009void main() => runApp(const SelectionAreaExampleApp());
chunhtaiefb93682022-05-24 13:53:55 -070010
Greg Spencere3bc8ef2023-04-04 13:34:29 -070011class SelectionAreaExampleApp extends StatelessWidget {
12 const SelectionAreaExampleApp({super.key});
chunhtaiefb93682022-05-24 13:53:55 -070013
14 @override
15 Widget build(BuildContext context) {
16 return MaterialApp(
chunhtaiefb93682022-05-24 13:53:55 -070017 home: SelectionArea(
18 child: Scaffold(
Greg Spencere3bc8ef2023-04-04 13:34:29 -070019 appBar: AppBar(title: const Text('SelectionArea Sample')),
Michael Goderbauerb0f17142023-02-02 11:33:57 -080020 body: const Center(
chunhtaiefb93682022-05-24 13:53:55 -070021 child: Column(
22 mainAxisAlignment: MainAxisAlignment.center,
Michael Goderbauerb0f17142023-02-02 11:33:57 -080023 children: <Widget>[
chunhtaiefb93682022-05-24 13:53:55 -070024 Text('Row 1'),
25 Text('Row 2'),
26 Text('Row 3'),
27 ],
28 ),
29 ),
30 ),
31 ),
32 );
33 }
34}