touch ./animations (#148)

* Update project structure using flutter create and remove unused tests
* Small updates to main.dart
* Update maintenance.md
* Add missing newline
* Add rudimentary test
* Apply formatting
pull/153/head
Thea Flowers 5 years ago committed by GitHub
parent e3338726c6
commit 74c1777b2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -6,7 +6,7 @@ match any new language/SDK features, etc.).
| Sample | GH username | Date Updated |
| :------------------------ | -----------------: | -------------: |
| animations | | |
| animations | theacodes | 10/7/19 |
| chrome-os-best-practices | | |
| experimental | | |
| flutter_maps_firestore | | |

@ -61,6 +61,7 @@
**/ios/Flutter/app.flx
**/ios/Flutter/app.zip
**/ios/Flutter/flutter_assets/
**/ios/Flutter/flutter_export_environment.sh
**/ios/ServiceDefinitions.json
**/ios/Runner/GeneratedPluginRegistrant.*

@ -0,0 +1,7 @@
gradle-wrapper.jar
/.gradle
/captures/
/gradlew
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java

@ -0,0 +1,13 @@
package com.example.animations
import android.os.Bundle
import io.flutter.app.FlutterActivity
import io.flutter.plugins.GeneratedPluginRegistrant
class MainActivity: FlutterActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
GeneratedPluginRegistrant.registerWith(this)
}
}

@ -0,0 +1,31 @@
*.mode1v3
*.mode2v3
*.moved-aside
*.pbxuser
*.perspectivev3
**/*sync/
.sconsign.dblite
.tags*
**/.vagrant/
**/DerivedData/
Icon?
**/Pods/
**/.symlinks/
profile
xcuserdata
**/.generated/
Flutter/App.framework
Flutter/Flutter.framework
Flutter/Generated.xcconfig
Flutter/app.flx
Flutter/app.zip
Flutter/flutter_assets/
Flutter/flutter_export_environment.sh
ServiceDefinitions.json
Runner/GeneratedPluginRegistrant.*
# Exceptions to above rules.
!default.mode1v3
!default.mode2v3
!default.pbxuser
!default.perspectivev3

@ -0,0 +1,13 @@
import UIKit
import Flutter
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}

@ -0,0 +1 @@
#import "GeneratedPluginRegistrant.h"

@ -25,35 +25,65 @@ class Demo {
final String route;
final WidgetBuilder builder;
const Demo(this.name, this.route, this.builder);
const Demo({this.name, this.route, this.builder});
}
final basicDemos = [
Demo('AnimatedContainer', AnimatedContainerDemo.routeName,
(context) => AnimatedContainerDemo()),
Demo('PageRouteBuilder', PageRouteBuilderDemo.routeName,
(context) => PageRouteBuilderDemo()),
Demo('Animation Controller', AnimationControllerDemo.routeName,
(context) => AnimationControllerDemo()),
Demo('Tweens', TweenDemo.routeName, (context) => TweenDemo()),
Demo('AnimatedBuilder', AnimatedBuilderDemo.routeName,
(context) => AnimatedBuilderDemo()),
Demo('Custom Tween', CustomTweenDemo.routeName,
(context) => CustomTweenDemo()),
Demo('Tween Sequences', TweenSequenceDemo.routeName,
(context) => TweenSequenceDemo()),
Demo(
name: 'AnimatedContainer',
route: AnimatedContainerDemo.routeName,
builder: (context) => AnimatedContainerDemo()),
Demo(
name: 'PageRouteBuilder',
route: PageRouteBuilderDemo.routeName,
builder: (context) => PageRouteBuilderDemo()),
Demo(
name: 'Animation Controller',
route: AnimationControllerDemo.routeName,
builder: (context) => AnimationControllerDemo()),
Demo(
name: 'Tweens',
route: TweenDemo.routeName,
builder: (context) => TweenDemo()),
Demo(
name: 'AnimatedBuilder',
route: AnimatedBuilderDemo.routeName,
builder: (context) => AnimatedBuilderDemo()),
Demo(
name: 'Custom Tween',
route: CustomTweenDemo.routeName,
builder: (context) => CustomTweenDemo()),
Demo(
name: 'Tween Sequences',
route: TweenSequenceDemo.routeName,
builder: (context) => TweenSequenceDemo()),
];
final miscDemos = [
Demo('Expandable Card', ExpandCardDemo.routeName,
(context) => ExpandCardDemo()),
Demo('Carousel', CarouselDemo.routeName, (context) => CarouselDemo()),
Demo('Focus Image', FocusImageDemo.routeName, (context) => FocusImageDemo()),
Demo('Card Swipe', CardSwipeDemo.routeName, (context) => CardSwipeDemo()),
Demo('Repeating Animation', RepeatingAnimationDemo.routeName,
(context) => RepeatingAnimationDemo()),
Demo('Spring Physics', PhysicsCardDragDemo.routeName,
(context) => PhysicsCardDragDemo()),
Demo(
name: 'Expandable Card',
route: ExpandCardDemo.routeName,
builder: (context) => ExpandCardDemo()),
Demo(
name: 'Carousel',
route: CarouselDemo.routeName,
builder: (context) => CarouselDemo()),
Demo(
name: 'Focus Image',
route: FocusImageDemo.routeName,
builder: (context) => FocusImageDemo()),
Demo(
name: 'Card Swipe',
route: CardSwipeDemo.routeName,
builder: (context) => CardSwipeDemo()),
Demo(
name: 'Repeating Animation',
route: RepeatingAnimationDemo.routeName,
builder: (context) => RepeatingAnimationDemo()),
Demo(
name: 'Spring Physics',
route: PhysicsCardDragDemo.routeName,
builder: (context) => PhysicsCardDragDemo()),
];
final basicDemoRoutes =

@ -1,9 +0,0 @@
// Copyright 2019 The Flutter team. 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:flutter_test/flutter_test.dart';
void main() {
testWidgets('This test always passes', (tester) async {});
}

@ -0,0 +1,20 @@
// This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility that Flutter provides. For example, you can send tap and scroll
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.
import 'package:flutter_test/flutter_test.dart';
import 'package:animations/main.dart';
void main() {
testWidgets('Counter increments smoke test', (tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(AnimationSamples());
// Verify that a least one of our demos is showing up in the list
expect(find.text('AnimatedContainer'), findsOneWidget);
});
}

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>animations</title>
</head>
<body>
<script src="main.dart.js" type="application/javascript"></script>
</body>
</html>
Loading…
Cancel
Save