flutter/examples/api/lib/material/outlined_button/outlined_button.0.dart
Mouad Debbar c2ea78d231
Revert "Enable avoid_print lint. (#91332)" (#91438)
This reverts commit cb378edc9e8dbcb451cc6e969161032cc08da52a.
2021-10-07 16:16:17 -04:00

43 lines
996 B
Dart

// 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.
// Flutter code sample for OutlinedButton
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
static const String _title = 'Flutter Code Sample';
@override
Widget build(BuildContext context) {
return MaterialApp(
title: _title,
home: Scaffold(
appBar: AppBar(title: const Text(_title)),
body: const Center(
child: MyStatelessWidget(),
),
),
);
}
}
class MyStatelessWidget extends StatelessWidget {
const MyStatelessWidget({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return OutlinedButton(
onPressed: () {
print('Received click');
},
child: const Text('Click Me'),
);
}
}