Search
 
SCRIPT & CODE EXAMPLE
 

DART

rotate IconButton flutter

import 'dart:math' as math;

Transform.rotate(
  angle: 180 * math.pi / 180,
  child: IconButton(
    icon: Icon(
      Icons.play,
      color: Colors.white,
    ),
    onPressed: null,
  ),
),
Comment

flutter rotate animation icon on press

@override
  void initState() {
    super.initState();

    _controller = AnimationController(
      vsync: this,
      duration: Duration(milliseconds: 300),
      upperBound: 0.5,
    );
  }
  
  @override
  void dispose() {
    super.dispose();
    _controller.dispose();
  }
  
  RotationTransition(
              turns: Tween(begin: 0.0, end: 0.5).animate(_controller),
              child: IconButton(
                icon: Icon(Icons.expand_less),
                onPressed: () {
                  setState(() {
                    if (_expanded) {
                      _controller..reverse(from: 0.5);
                    } else {
                      _controller..forward(from: 0.0);
                    }
                    _expanded = !_expanded;
                  });
                },
              ),
            )
Comment

PREVIOUS NEXT
Code Example
Dart :: options != null "FirebaseOptions cannot be null when creating the default app." 
Dart :: constrainedbox flutter 
Dart :: flutter textfield with icon onclick 
Dart :: flutter TextButton.icon 
Dart :: close keyboard on button click flutter 
Dart :: flutter chip labelstyle 
Dart :: close current page flutter 
Dart :: flutter dropdown button remove underline 
Dart :: hive regiter adapter enum 
Dart :: floating action button rectangle flutter 
Dart :: alertdialog flutter outside click disble 
Dart :: text should come below if space not available row flutter 
Dart :: flutter animatedcontainer 
Dart :: dart square root 
Dart :: flutter floting action button elevation 
Dart :: remove duplicates from array dart 
Dart :: make text filed round flutter 
Dart :: space around in flutter 
Dart :: dart init Map 
Dart :: flutter getit reset 
Dart :: dart uri 
Dart :: dart for each indexed 
Dart :: destructor in dart 
Dart :: snackbar flutter 
Dart :: flutter image size not working 
Dart :: flutter sliver 
Dart :: dart list generate 
Dart :: flutter map key/value 
Dart :: flutter leading 
Dart :: loop map flutter 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =