diff --git a/animations/lib/main.dart b/animations/lib/main.dart index af5f44e36..1bcbff2ea 100644 --- a/animations/lib/main.dart +++ b/animations/lib/main.dart @@ -178,7 +178,8 @@ class AnimationSamples extends StatelessWidget { return MaterialApp.router( title: 'Animation Samples', theme: ThemeData( - primarySwatch: Colors.deepPurple, + colorSchemeSeed: Colors.deepPurple, + useMaterial3: true, ), routerConfig: router, ); diff --git a/animations/lib/src/basics/06_custom_tween.dart b/animations/lib/src/basics/06_custom_tween.dart index 7de726c6e..36a4bbb4f 100644 --- a/animations/lib/src/basics/06_custom_tween.dart +++ b/animations/lib/src/basics/06_custom_tween.dart @@ -50,8 +50,7 @@ class _CustomTweenDemoState extends State appBar: AppBar( title: const Text('Custom Tween'), actions: [ - MaterialButton( - textColor: Colors.white, + TextButton( onPressed: () { if (controller.status == AnimationStatus.completed) { controller.reverse().whenComplete(() { diff --git a/animations/lib/src/misc/animated_switcher.dart b/animations/lib/src/misc/animated_switcher.dart index 35880fb21..ee048f4a7 100644 --- a/animations/lib/src/misc/animated_switcher.dart +++ b/animations/lib/src/misc/animated_switcher.dart @@ -47,15 +47,11 @@ class _AnimatedSwitcherDemoState extends State { appBar: AppBar( title: const Text('AnimatedSwitcher'), actions: [ - MaterialButton( + TextButton( onPressed: () => setState( () => container = generateContainer(++keyCount), ), - child: Text( - 'Change Widget', - style: TextStyle( - color: Theme.of(context).buttonTheme.colorScheme!.onPrimary), - ), + child: const Text('Change Widget'), ), ], ),