mirror of
https://github.com/flutter/samples.git
synced 2026-04-01 09:13:23 +00:00
Beta (#1234)
This commit is contained in:
@@ -39,7 +39,7 @@ class Particles extends StatefulWidget {
|
||||
const Particles(this.numberOfParticles, {key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_ParticlesState createState() => _ParticlesState();
|
||||
State<Particles> createState() => _ParticlesState();
|
||||
}
|
||||
|
||||
class _ParticlesState extends State<Particles> {
|
||||
|
||||
@@ -36,7 +36,7 @@ class Rendering extends StatefulWidget {
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
_RenderingState createState() => _RenderingState();
|
||||
State<Rendering> createState() => _RenderingState();
|
||||
}
|
||||
|
||||
class _RenderingState extends State<Rendering>
|
||||
@@ -199,7 +199,7 @@ class MultiTrackTween extends Animatable<Map<String, dynamic>> {
|
||||
/// Single property to tween. Used by [MultiTrackTween].
|
||||
class Track<T> {
|
||||
final String name;
|
||||
final List<_TrackItem> items = [];
|
||||
final List<TrackItem> items = [];
|
||||
|
||||
Track(this.name);
|
||||
|
||||
@@ -211,20 +211,20 @@ class Track<T> {
|
||||
/// Optionally you can set a named parameter [curve] that applies an easing
|
||||
/// curve to the tween.
|
||||
Track<T> add(Duration duration, Animatable<T> tween, {Curve? curve}) {
|
||||
items.add(_TrackItem(duration, tween, curve: curve));
|
||||
items.add(TrackItem(duration, tween, curve: curve));
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
class _TrackItem<T> {
|
||||
class TrackItem<T> {
|
||||
final Duration duration;
|
||||
late Animatable<T> tween;
|
||||
|
||||
_TrackItem(this.duration, Animatable<T> _tween, {Curve? curve}) {
|
||||
TrackItem(this.duration, Animatable<T> tween, {Curve? curve}) {
|
||||
if (curve != null) {
|
||||
tween = _tween.chain(CurveTween(curve: curve));
|
||||
this.tween = tween.chain(CurveTween(curve: curve));
|
||||
} else {
|
||||
tween = _tween;
|
||||
this.tween = tween;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -336,7 +336,7 @@ class ControlledAnimation<T> extends StatefulWidget {
|
||||
super(key: key);
|
||||
|
||||
@override
|
||||
_ControlledAnimationState<T> createState() => _ControlledAnimationState<T>();
|
||||
State<ControlledAnimation> createState() => _ControlledAnimationState<T>();
|
||||
}
|
||||
|
||||
class _ControlledAnimationState<T> extends State<ControlledAnimation>
|
||||
|
||||
@@ -26,14 +26,14 @@ packages:
|
||||
name: flutter_lints
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
version: "2.0.1"
|
||||
lints:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: lints
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.1"
|
||||
version: "2.0.0"
|
||||
material_color_utilities:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -61,4 +61,4 @@ packages:
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
sdks:
|
||||
dart: ">=2.14.0 <3.0.0"
|
||||
dart: ">=2.17.0-206.0.dev <3.0.0"
|
||||
|
||||
@@ -3,12 +3,12 @@ description: Example for the simple_animations package
|
||||
homepage: https://github.com/felixblaschke/simple_animations
|
||||
|
||||
environment:
|
||||
sdk: '>=2.12.0 <3.0.0'
|
||||
sdk: ">=2.17.0-0 <3.0.0"
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
flutter_lints: ^1.0.4
|
||||
flutter_lints: ^2.0.1
|
||||
flutter:
|
||||
assets:
|
||||
- preview.png
|
||||
|
||||
Reference in New Issue
Block a user