Download flutter/examples/api/lib/material/icon_button/icon_button.1.dart from luom2645/agent-workspace: direct link, hf CLI and curl.
- Browser
- Download file 1.1 kB
-
https://huggingface.co/luom2645/agent-workspace/resolve/main/flutter/examples/api/lib/material/icon_button/icon_button.1.dart
- Command line
-
hf download hf://luom2645/agent-workspace/flutter/examples/api/lib/material/icon_button/icon_button.1.dart
-
curl -L -o icon_button.1.dart https://huggingface.co/luom2645/agent-workspace/resolve/main/flutter/examples/api/lib/material/icon_button/icon_button.1.dart
1.1 kB
| // 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'; | |
| /// Flutter code sample for [IconButton]. | |
| void main() => runApp(const IconButtonExampleApp()); | |
| class IconButtonExampleApp extends StatelessWidget { | |
| const IconButtonExampleApp({super.key}); | |
| Widget build(BuildContext context) { | |
| return MaterialApp( | |
| home: Scaffold( | |
| appBar: AppBar(title: const Text('IconButton Sample')), | |
| body: const IconButtonExample(), | |
| ), | |
| ); | |
| } | |
| } | |
| class IconButtonExample extends StatelessWidget { | |
| const IconButtonExample({super.key}); | |
| Widget build(BuildContext context) { | |
| return Material( | |
| color: Colors.white, | |
| child: Center( | |
| child: Ink( | |
| decoration: const ShapeDecoration(color: Colors.lightBlue, shape: CircleBorder()), | |
| child: IconButton(icon: const Icon(Icons.android), color: Colors.white, onPressed: () {}), | |
| ), | |
| ), | |
| ); | |
| } | |
| } | |