From 330af86bdca0ddc186374e7ff2ca092e30a22221 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Mon, 5 Oct 2015 17:35:51 -0700 Subject: [PATCH] Delete AnimatedComponent This class has no clients. --- .../lib/src/widgets/animated_component.dart | 50 ------------------- packages/flutter/lib/widgets.dart | 1 - 2 files changed, 51 deletions(-) delete mode 100644 packages/flutter/lib/src/widgets/animated_component.dart diff --git a/packages/flutter/lib/src/widgets/animated_component.dart b/packages/flutter/lib/src/widgets/animated_component.dart deleted file mode 100644 index cf6acbc34f..0000000000 --- a/packages/flutter/lib/src/widgets/animated_component.dart +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2015 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import 'package:sky/animation.dart'; -import 'package:sky/src/widgets/framework.dart'; - -abstract class AnimatedComponent extends StatefulComponent { - const AnimatedComponent({ Key key, this.direction, this.duration }) : super(key: key); - - final Duration duration; - final AnimationDirection direction; -} - -abstract class AnimatedState extends State { - void initState() { - super.initState(); - _performance = new Performance(duration: config.duration); - performance.addStatusListener(_handleAnimationStatusChanged); - if (buildDependsOnPerformance) { - performance.addListener(() { - setState(() { - // We don't actually have any state to change, per se, - // we just know that we have in fact changed state. - }); - }); - } - performance.play(config.direction); - } - - void didUpdateConfig(T oldConfig) { - performance.duration = config.duration; - if (config.duration != oldConfig.duration || config.direction != oldConfig.direction) - performance.play(config.direction); - } - - Performance get performance => _performance; - Performance _performance; - - void _handleAnimationStatusChanged(PerformanceStatus status) { - if (status == PerformanceStatus.completed) - handleCompleted(); - else if (status == PerformanceStatus.dismissed) - handleDismissed(); - } - - bool get buildDependsOnPerformance => false; - void handleCompleted() { } - void handleDismissed() { } -} diff --git a/packages/flutter/lib/widgets.dart b/packages/flutter/lib/widgets.dart index d43db17293..93eabd8dba 100644 --- a/packages/flutter/lib/widgets.dart +++ b/packages/flutter/lib/widgets.dart @@ -5,7 +5,6 @@ /// The Flutter widget framework. library widgets; -export 'src/widgets/animated_component.dart'; export 'src/widgets/animated_container.dart'; export 'src/widgets/app.dart'; export 'src/widgets/basic.dart';