curved_animation_controller 0.0.3 copy "curved_animation_controller: ^0.0.3" to clipboard
curved_animation_controller: ^0.0.3 copied to clipboard

outdated

The easy way to use AnimationController with Curve.

example/lib/main.dart

import 'package:example/animated_drawer.dart';
import 'package:example/flip_drawer.dart';
import 'package:example/page.dart';
import 'package:example/shared.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(App());
}

class App extends StatefulWidget {

  static _AppState of(BuildContext context) =>
    context.findAncestorStateOfType<_AppState>();
  
  @override
  _AppState createState() => _AppState();
}

class _AppState extends State<App> {
  
  String _title = 'Curved Animation';
  Key _key = UniqueKey();

  restart() {
    setState(() {
      _key = UniqueKey();
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      key: _key,
      title: 'Curved Animation Controller Demo',
      theme: ThemeData(
        primarySwatch: Colors.teal,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: type == DrawerType.flip 
        ? FlipDrawer(title: _title, drawer: DrawerWidget(), child: HomePage()) 
        : AnimatedDrawer(drawer: DrawerWidget(), child: HomePage(title: _title)),
    );
  }
}
14
likes
0
pub points
65%
popularity

Publisher

unverified uploader

The easy way to use AnimationController with Curve.

Homepage

License

unknown (license)

Dependencies

flutter

More

Packages that depend on curved_animation_controller