mirror of
https://github.com/flutter/samples.git
synced 2026-03-30 08:11:40 +00:00
Migrate animations to go_router (#1521)
This commit is contained in:
@@ -12,7 +12,7 @@ Color generateColor() => Color(0xFFFFFFFF & Random().nextInt(0xFFFFFFFF));
|
||||
|
||||
class AnimatedContainerDemo extends StatefulWidget {
|
||||
const AnimatedContainerDemo({super.key});
|
||||
static String routeName = '/basics/01_animated_container';
|
||||
static String routeName = 'basics/01_animated_container';
|
||||
|
||||
@override
|
||||
State<AnimatedContainerDemo> createState() => _AnimatedContainerDemoState();
|
||||
|
||||
@@ -6,7 +6,7 @@ import 'package:flutter/material.dart';
|
||||
|
||||
class PageRouteBuilderDemo extends StatelessWidget {
|
||||
const PageRouteBuilderDemo({super.key});
|
||||
static const String routeName = '/basics/page_route_builder';
|
||||
static const String routeName = 'basics/page_route_builder';
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@@ -6,7 +6,7 @@ import 'package:flutter/material.dart';
|
||||
|
||||
class AnimationControllerDemo extends StatefulWidget {
|
||||
const AnimationControllerDemo({super.key});
|
||||
static const String routeName = '/basics/animation_controller';
|
||||
static const String routeName = 'basics/animation_controller';
|
||||
|
||||
@override
|
||||
State<AnimationControllerDemo> createState() =>
|
||||
|
||||
@@ -6,7 +6,7 @@ import 'package:flutter/material.dart';
|
||||
|
||||
class TweenDemo extends StatefulWidget {
|
||||
const TweenDemo({super.key});
|
||||
static const String routeName = '/basics/tweens';
|
||||
static const String routeName = 'basics/tweens';
|
||||
|
||||
@override
|
||||
State<TweenDemo> createState() => _TweenDemoState();
|
||||
|
||||
@@ -6,7 +6,7 @@ import 'package:flutter/material.dart';
|
||||
|
||||
class AnimatedBuilderDemo extends StatefulWidget {
|
||||
const AnimatedBuilderDemo({super.key});
|
||||
static const String routeName = '/basics/animated_builder';
|
||||
static const String routeName = 'basics/animated_builder';
|
||||
|
||||
@override
|
||||
State<AnimatedBuilderDemo> createState() => _AnimatedBuilderDemoState();
|
||||
|
||||
@@ -17,7 +17,7 @@ class TypewriterTween extends Tween<String> {
|
||||
|
||||
class CustomTweenDemo extends StatefulWidget {
|
||||
const CustomTweenDemo({super.key});
|
||||
static const String routeName = '/basics/custom_tweens';
|
||||
static const String routeName = 'basics/custom_tweens';
|
||||
|
||||
@override
|
||||
State<CustomTweenDemo> createState() => _CustomTweenDemoState();
|
||||
|
||||
@@ -6,7 +6,7 @@ import 'package:flutter/material.dart';
|
||||
|
||||
class TweenSequenceDemo extends StatefulWidget {
|
||||
const TweenSequenceDemo({super.key});
|
||||
static const String routeName = '/basics/chaining_tweens';
|
||||
static const String routeName = 'basics/chaining_tweens';
|
||||
|
||||
@override
|
||||
State<TweenSequenceDemo> createState() => _TweenSequenceDemoState();
|
||||
|
||||
@@ -8,7 +8,7 @@ import 'package:flutter/material.dart';
|
||||
// for examples of other common animated widgets.
|
||||
class FadeTransitionDemo extends StatefulWidget {
|
||||
const FadeTransitionDemo({super.key});
|
||||
static const String routeName = '/basics/fade_transition';
|
||||
static const String routeName = 'basics/fade_transition';
|
||||
|
||||
@override
|
||||
State<FadeTransitionDemo> createState() => _FadeTransitionDemoState();
|
||||
|
||||
Reference in New Issue
Block a user