@@ -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 [DeletableChipAttributes.onDeleted].
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
void main() => runApp(const MyApp());
|
||||
/// Flutter code sample for [DeletableChipAttributes.onDeleted].
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({super.key});
|
||||
void main() => runApp(const OnDeletedExampleApp());
|
||||
|
||||
static const String _title = 'Flutter Code Sample';
|
||||
class OnDeletedExampleApp extends StatelessWidget {
|
||||
const OnDeletedExampleApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
title: _title,
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text(_title)),
|
||||
appBar: AppBar(title: const Text('DeletableChipAttributes.onDeleted Sample')),
|
||||
body: const Center(
|
||||
child: MyStatefulWidget(),
|
||||
child: OnDeletedExample(),
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -75,14 +72,14 @@ class CastListState extends State<CastList> {
|
||||
}
|
||||
}
|
||||
|
||||
class MyStatefulWidget extends StatefulWidget {
|
||||
const MyStatefulWidget({super.key});
|
||||
class OnDeletedExample extends StatefulWidget {
|
||||
const OnDeletedExample({super.key});
|
||||
|
||||
@override
|
||||
State<MyStatefulWidget> createState() => _MyStatefulWidgetState();
|
||||
State<OnDeletedExample> createState() => _OnDeletedExampleState();
|
||||
}
|
||||
|
||||
class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
class _OnDeletedExampleState extends State<OnDeletedExample> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const CastList();
|
||||
|
||||
Reference in New Issue
Block a user