v2.0.0animated_rotation
회전을 위한 암시적 애니메이션 위젯입니다. 각도만 제공하면 위젯은 시간이 지남에 따라 회전합니다.
26좋아요 82230일 다운로드160Pub 점수
AndroidiOSWebmacOSWindowsLinux
회전을 위한 암시적 애니메이션 위젯
아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
An implicitly animated version of RotationTransition which automatically transitions the rotation over time when the provided angle changes.
Check it out on DartPad
Get it from pub. Add the dependency to your pubspec.yaml
dependencies:
animated_rotation: ^1.0.0
Run flutter pub get in your root folder after saving the pubspec.yaml file
Here is an example of the counter app with text rotating based on the count
import 'package:animated_rotation/animated_rotation.dart';
import 'package:flutter/material.dart';
void main() => runApp(MyHomePage());
class MyHomePage extends StatefulWidget {
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
int _counter = 0;
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text("AnimatedRotation example"),
),
body: Center(
child: AnimatedRotation(
angle: _counter,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'You have pushed the button this many times:',
),
Text(
'$_counter',
style: Theme.of(context).textTheme.display1,
),
],
),
),
),
floatingActionButton: FloatingActionButton(
onPressed: () {
setState(() {
_counter++;
});
},
tooltip: 'Increment',
child: Icon(Icons.add),
),
),
);
}
}
의존성 목록 2 개
{"sdk":"flutter"}{"sdk":"flutter"}사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗