1
0
mirror of https://github.com/flutter/samples.git synced 2026-04-01 17:23:18 +00:00
This commit is contained in:
Brett Morgan
2022-05-11 12:48:11 -07:00
committed by GitHub
parent fb00d0a102
commit ccd68f34e2
242 changed files with 1719 additions and 1430 deletions

View File

@@ -52,7 +52,7 @@ class PlatformAdaptingHomePage extends StatefulWidget {
const PlatformAdaptingHomePage({Key? key}) : super(key: key);
@override
_PlatformAdaptingHomePageState createState() =>
State<PlatformAdaptingHomePage> createState() =>
_PlatformAdaptingHomePageState();
}

View File

@@ -18,7 +18,7 @@ class NewsTab extends StatefulWidget {
const NewsTab({Key? key}) : super(key: key);
@override
_NewsTabState createState() => _NewsTabState();
State<NewsTab> createState() => _NewsTabState();
}
class _NewsTabState extends State<NewsTab> {

View File

@@ -229,9 +229,9 @@ class LogOutButton extends StatelessWidget {
message: _logoutMessage,
actions: [
CupertinoActionSheetAction(
child: const Text('Reprogram the night man'),
isDestructiveAction: true,
onPressed: () => Navigator.pop(context),
child: const Text('Reprogram the night man'),
),
CupertinoActionSheetAction(
child: const Text('Got it'),
@@ -239,9 +239,9 @@ class LogOutButton extends StatelessWidget {
),
],
cancelButton: CupertinoActionSheetAction(
child: const Text('Cancel'),
isDefaultAction: true,
onPressed: () => Navigator.pop(context),
child: const Text('Cancel'),
),
);
},

View File

@@ -15,7 +15,7 @@ class SettingsTab extends StatefulWidget {
const SettingsTab({Key? key}) : super(key: key);
@override
_SettingsTabState createState() => _SettingsTabState();
State<SettingsTab> createState() => _SettingsTabState();
}
class _SettingsTabState extends State<SettingsTab> {

View File

@@ -20,7 +20,7 @@ class SongsTab extends StatefulWidget {
final Widget? androidDrawer;
@override
_SongsTabState createState() => _SongsTabState();
State<SongsTab> createState() => _SongsTabState();
}
class _SongsTabState extends State<SongsTab> {
@@ -96,7 +96,7 @@ class _SongsTabState extends State<SongsTab> {
// done in a real app but it's done here since this app
// unrealistically toggles the current platform for demonstration
// purposes.
WidgetsBinding.instance!.reassembleApplication();
WidgetsBinding.instance.reassembleApplication();
}
// ===========================================================================
@@ -145,8 +145,8 @@ class _SongsTabState extends State<SongsTab> {
CupertinoSliverNavigationBar(
trailing: CupertinoButton(
padding: EdgeInsets.zero,
child: const Icon(CupertinoIcons.shuffle),
onPressed: _togglePlatform,
child: const Icon(CupertinoIcons.shuffle),
),
),
CupertinoSliverRefreshControl(