mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 13:58:47 +00:00
Enable Material 3 on Animations sample (#1605)
This commit is contained in:
@@ -178,7 +178,8 @@ class AnimationSamples extends StatelessWidget {
|
|||||||
return MaterialApp.router(
|
return MaterialApp.router(
|
||||||
title: 'Animation Samples',
|
title: 'Animation Samples',
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
primarySwatch: Colors.deepPurple,
|
colorSchemeSeed: Colors.deepPurple,
|
||||||
|
useMaterial3: true,
|
||||||
),
|
),
|
||||||
routerConfig: router,
|
routerConfig: router,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -50,8 +50,7 @@ class _CustomTweenDemoState extends State<CustomTweenDemo>
|
|||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: const Text('Custom Tween'),
|
title: const Text('Custom Tween'),
|
||||||
actions: [
|
actions: [
|
||||||
MaterialButton(
|
TextButton(
|
||||||
textColor: Colors.white,
|
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
if (controller.status == AnimationStatus.completed) {
|
if (controller.status == AnimationStatus.completed) {
|
||||||
controller.reverse().whenComplete(() {
|
controller.reverse().whenComplete(() {
|
||||||
|
|||||||
@@ -47,15 +47,11 @@ class _AnimatedSwitcherDemoState extends State<AnimatedSwitcherDemo> {
|
|||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: const Text('AnimatedSwitcher'),
|
title: const Text('AnimatedSwitcher'),
|
||||||
actions: [
|
actions: [
|
||||||
MaterialButton(
|
TextButton(
|
||||||
onPressed: () => setState(
|
onPressed: () => setState(
|
||||||
() => container = generateContainer(++keyCount),
|
() => container = generateContainer(++keyCount),
|
||||||
),
|
),
|
||||||
child: Text(
|
child: const Text('Change Widget'),
|
||||||
'Change Widget',
|
|
||||||
style: TextStyle(
|
|
||||||
color: Theme.of(context).buttonTheme.colorScheme!.onPrimary),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user