@@ -2,25 +2,22 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Flutter code sample for [IconButton].
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
void main() => runApp(const MyApp());
|
||||
/// Flutter code sample for [IconButton].
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({super.key});
|
||||
void main() => runApp(const IconButtonExampleApp());
|
||||
|
||||
static const String _title = 'Flutter Code Sample';
|
||||
class IconButtonExampleApp extends StatelessWidget {
|
||||
const IconButtonExampleApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
title: _title,
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text(_title)),
|
||||
appBar: AppBar(title: const Text('IconButton Sample')),
|
||||
body: const Center(
|
||||
child: MyStatefulWidget(),
|
||||
child: IconButtonExample(),
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -29,14 +26,14 @@ class MyApp extends StatelessWidget {
|
||||
|
||||
double _volume = 0.0;
|
||||
|
||||
class MyStatefulWidget extends StatefulWidget {
|
||||
const MyStatefulWidget({super.key});
|
||||
class IconButtonExample extends StatefulWidget {
|
||||
const IconButtonExample({super.key});
|
||||
|
||||
@override
|
||||
State<MyStatefulWidget> createState() => _MyStatefulWidgetState();
|
||||
State<IconButtonExample> createState() => _IconButtonExampleState();
|
||||
}
|
||||
|
||||
class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
class _IconButtonExampleState extends State<IconButtonExample> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
|
||||
@@ -2,31 +2,28 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Flutter code sample for [IconButton].
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
void main() => runApp(const MyApp());
|
||||
/// Flutter code sample for [IconButton].
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({super.key});
|
||||
void main() => runApp(const IconButtonExampleApp());
|
||||
|
||||
static const String _title = 'Flutter Code Sample';
|
||||
class IconButtonExampleApp extends StatelessWidget {
|
||||
const IconButtonExampleApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
title: _title,
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text(_title)),
|
||||
body: const MyStatelessWidget(),
|
||||
appBar: AppBar(title: const Text('IconButton Sample')),
|
||||
body: const IconButtonExample(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class MyStatelessWidget extends StatelessWidget {
|
||||
const MyStatelessWidget({super.key});
|
||||
class IconButtonExample extends StatelessWidget {
|
||||
const IconButtonExample({super.key});
|
||||
|
||||
@override
|
||||
@override
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Flutter code sample for [IconButton].
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Flutter code sample for [IconButton].
|
||||
|
||||
void main() {
|
||||
runApp(const IconButtonApp());
|
||||
}
|
||||
@@ -45,7 +45,7 @@ class ButtonTypesExample extends StatelessWidget {
|
||||
}
|
||||
|
||||
class ButtonTypesGroup extends StatelessWidget {
|
||||
const ButtonTypesGroup({ super.key, required this.enabled });
|
||||
const ButtonTypesGroup({super.key, required this.enabled});
|
||||
|
||||
final bool enabled;
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Flutter code sample for [IconButton] with toggle feature.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Flutter code sample for [IconButton] with toggle feature.
|
||||
|
||||
void main() {
|
||||
runApp(const IconButtonToggleApp());
|
||||
}
|
||||
@@ -134,7 +134,7 @@ class _DemoIconToggleButtonsState extends State<DemoIconToggleButtons> {
|
||||
),
|
||||
],
|
||||
),
|
||||
]
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user