OutlinedButton
OutlinedButton
Source Code
import 'package:flutter/material.dart';
void main() => runApp( MyApp());
/// This is the main application widget.
class MyApp extends StatelessWidget {
static const String _title = 'OutlinedButton';
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: _title,
home: Scaffold(
appBar: AppBar(title: const Text(_title)),
body: const Center(
child: MyStatelessWidget(),
),
),
);
}
}
/// This is the stateless widget that the main application instantiates.
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'),
);
}
}
Comments
Post a Comment