Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 905 Bytes

blink.md

File metadata and controls

43 lines (31 loc) · 905 Bytes

Blink

simple_fade

Simple Blink

    Spring.blink(child: RedCard())

Customized Blink

import 'package:flutter/material.dart';
import 'package:spring/spring.dart';
import 'package:test123/demo_widget.dart';

class SpringExample extends StatelessWidget {
  /* initial motion for blink is Motion.mirror
   which is automatically take by spring */
  final SpringController springController = SpringController();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      body: Center(
        child: Spring.blink(
          springController: springController, //control animations
          startOpacity: 0.3, //default=0.0
          endOpacity: 0.9, //default=1.1
          child: RedCard(),
        ),
      ),
    );
  }
}