{"id":338931,"date":"2022-09-27T15:00:46","date_gmt":"2022-09-27T15:00:46","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=338931"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=338931","title":{"rendered":"<span>\u0420\u0430\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0430\u044f\u0441\u044f \u043c\u0435\u043d\u044e\u0448\u043a\u0430<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u043c\u043d\u0435 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043c\u0435\u043d\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044e \u043d\u0430 floating button. \u041d\u0430\u0447\u0430\u043b \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0447\u0442\u043e \u0442\u0430\u043c \u0442\u0430\u043a\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0432 \u044d\u0442\u0438\u0445 \u0432\u0430\u0448\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430\u0445. \u041c\u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043a\u0430\u043a \u0432 \u0441\u0430\u043c\u0441\u0443\u043d\u0433\u0435 \u043c\u0435\u043d\u044e \u0434\u043b\u044f \u0441\u0442\u0438\u043b\u0443\u0441\u0430. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044f \u043d\u0435 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b, \u043a\u0430\u043a \u044d\u0442\u043e \u0433\u0443\u0433\u043b\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u044f \u043d\u0435 \u043d\u0430\u0448\u0435\u043b \u0442\u0430\u043a\u043e\u0433\u043e \u043c\u0435\u043d\u044e \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0438\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0433\u043e \u0441\u0430\u043c. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/d86\/cc0\/877\/d86cc0877d815f1a33bbea5326af2049.jpeg\" width=\"800\" height=\"500\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d86\/cc0\/877\/d86cc0877d815f1a33bbea5326af2049.jpeg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u0410\u043d\u0438\u043c\u0430\u0446\u0438\u044f<\/h2>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0432\u043e \u0444\u043b\u0430\u0442\u0442\u0435\u0440\u0435 \u044f \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u043b, \u044f \u043d\u0430\u0448\u0435\u043b \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 <a href=\"https:\/\/www.kindacode.com\/article\/flutter-floating-action-button\/\" rel=\"noopener noreferrer nofollow\">\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438<\/a>. \u041f\u043e-\u043d\u0430\u0447\u0430\u043b\u0443 \u044f \u0434\u0443\u043c\u0430\u043b \u0447\u0442\u043e \u043d\u0430\u0434\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0438\u0445 \u043a\u043d\u043e\u043f\u043e\u043a \u0438 \u0442\u0440\u0430\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0438\u0445 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f, \u043d\u043e \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u043a\u043d\u043e\u043f\u043a\u0438 \u0432\u044b\u043f\u043b\u044b\u0432\u0430\u044e\u0442 \u0438\u0437-\u0437\u0430 \u043a\u0440\u0430\u044f \u044d\u043a\u0440\u0430\u043d\u0430. \u041c\u043d\u0435 \u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0447\u0442\u043e\u0431\u044b \u043a\u043d\u043e\u043f\u043a\u0438 \u043f\u0440\u044f\u0442\u0430\u043b\u0438\u0441\u044c \u043f\u043e\u0434 floating action button. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b \u043a\u043e\u0434, \u0438 \u0442\u0430\u043a\u043e\u0435 \u0441\u043a\u0440\u044b\u0442\u0438\u0435 \u043a\u043d\u043e\u043f\u043e\u043a \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0438\u0437-\u0437\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0438\u0434\u0436\u0435\u0442\u0430 Column, \u043d\u043e \u0432\u0435\u0434\u044c \u0435\u0441\u0442\u044c Stack. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3a6\/a45\/8ef\/3a6a458efd06e7d75a8309a5f5f3c195.gif\" width=\"732\" height=\"580\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3a6\/a45\/8ef\/3a6a458efd06e7d75a8309a5f5f3c195.gif\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 \u043f\u043e \u043a\u0440\u0443\u0433\u0443 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u043c \u0438\u0437 \u043f\u043e\u043b\u044f\u0440\u043d\u044b\u0445 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u0432 \u0434\u0435\u043a\u0430\u0440\u0442\u043e\u0432\u044b. \u0410\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0435\u0437\u0434 \u043a\u043d\u043e\u043f\u043e\u043a \u0431\u0443\u0434\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0440\u0430\u0434\u0438\u0443\u0441\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043a\u043b\u0430\u0441\u0441\u043e\u0432 AnimationController \u0438 Tween. \u0412 AnimationController \u0443\u043a\u0430\u0436\u0435\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438, \u0430 \u0432 Tween \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0440\u0430\u0434\u0438\u0443\u0441\u0430 \u043e\u0442 0 \u0434\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e. \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0434\u0438\u0443\u0441 \u0438 \u0432\u0440\u0435\u043c\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u043c \u0438\u0437\u0432\u043d\u0435. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u0432 Stack \u043f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u043c FloatingActionButton, \u043f\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044e \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f.<\/p>\n<pre><code class=\"dart\">class FloatingMenu extends StatefulWidget {   const FloatingMenu(this.duration, this.radius, {Key? key})       : super(key: key);    final int duration;   final double radius;    @override   _FloatingMenuState createState() => _FloatingMenuState(); }  class _FloatingMenuState extends State&lt;FloatingMenu>     with SingleTickerProviderStateMixin {   late AnimationController _animationController;    late Animation&lt;double> _buttonAnimatedIcon;    late Animation&lt;double> _translateButton;    bool _isExpanded = false;    @override   initState() {     _animationController = AnimationController(         vsync: this, duration: Duration(milliseconds: widget.duration))       ..addListener(() {         setState(() {});       });      _buttonAnimatedIcon =         Tween&lt;double>(begin: 0.0, end: 1.0).animate(_animationController);      _translateButton = Tween&lt;double>(       begin: 0,       end: widget.radius,     ).animate(CurvedAnimation(       parent: _animationController,       curve: Curves.easeInOut,     ));     super.initState();   }    @override   dispose() {     _animationController.dispose();     super.dispose();   }    _toggle() {     if (_isExpanded) {       _animationController.reverse();     } else {       _animationController.forward();     }     _isExpanded = !_isExpanded;   }    @override   Widget build(BuildContext context) {     return Stack(       children: [         Transform(           transform: Matrix4.translationValues(             cos(pi) * _translateButton.value,             -1 * sin(pi) * _translateButton.value,             0,           ),           child: FloatingActionButton(             backgroundColor: Colors.blue,             onPressed: () {               \/* Do something *\/             },             child: const Icon(               Icons.photo_camera,             ),           ),         ),         Transform(           transform: Matrix4.translationValues(             cos(3 * pi \/ 4) * _translateButton.value,             -1 * sin(3 * pi \/ 4) * _translateButton.value,             0,           ),           child: FloatingActionButton(             backgroundColor: Colors.red,             onPressed: () {               \/* Do something *\/             },             child: const Icon(               Icons.video_camera_back,             ),           ),         ),         Transform(           transform: Matrix4.translationValues(             cos(pi \/ 2) * _translateButton.value,             -1 * sin(pi \/ 2) * _translateButton.value,             0,           ),           child: FloatingActionButton(             backgroundColor: Colors.amber,             onPressed: () {               \/* Do something *\/             },             child: const Icon(Icons.photo),           ),         ),         Transform(           transform: Matrix4.translationValues(             cos(pi \/ 4) * _translateButton.value,             -1 * sin(pi \/ 4) * _translateButton.value,             0,           ),           child: FloatingActionButton(             backgroundColor: Colors.deepPurpleAccent,             onPressed: () {               \/* Do something *\/             },             child: const Icon(               Icons.people_alt_outlined,             ),           ),         ),         Transform(           transform: Matrix4.translationValues(             cos(0) * _translateButton.value,             -1 * sin(0) * _translateButton.value,             0,           ),           child: FloatingActionButton(             backgroundColor: Colors.tealAccent,             onPressed: () {               \/* Do something *\/             },             child: const Icon(               Icons.settings,             ),           ),         ),         child: FloatingActionButton(           onPressed: _toggle,           child: AnimatedIcon(             icon: AnimatedIcons.menu_close,              progress: _buttonAnimatedIcon,             ),         ),       ],     );   } } <\/code><\/pre>\n<p>\u0423\u0440\u0430, \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u0434\u0435\u043b\u0430\u0435\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u043e \u0447\u0442\u043e \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e! \u041d\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043a\u043d\u043e\u043f\u043a\u0438 \u0442\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c, \u043d\u043e \u043d\u0430\u0436\u0430\u0442\u044c \u043d\u0430 \u043d\u0438\u0445 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. <\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ad7\/bdb\/450\/ad7bdb4503506031cfa3d7250d23733f.gif\" width=\"222\" height=\"480\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ad7\/bdb\/450\/ad7bdb4503506031cfa3d7250d23733f.gif\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u0421\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435 \u0432\u0435\u043b\u0438<\/h2>\n<p>\u0418\u0442\u0430\u043a, \u0438\u0449\u0435\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443. \u041f\u0435\u0440\u0432\u043e\u0435 \u0447\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443, \u0447\u0442\u043e \u0441\u0442\u044d\u043a \u0434\u0430\u0435\u0442 \u043d\u0430\u0436\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u044d\u0442\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c. \u0412 \u0441\u0430\u043c\u043e\u043c \u0441\u0442\u044d\u043a\u0435 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0444\u043b\u0430\u0433\u043e\u0432, \u043d\u043e \u0432 \u0444\u043b\u0430\u0442\u0442\u0435\u0440\u0435 \u0442\u0430\u043a\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043a\u043b\u0430\u0441\u0441 <a href=\"https:\/\/api.flutter.dev\/flutter\/widgets\/IgnorePointer-class.html\" rel=\"noopener noreferrer nofollow\">IgnorePointer<\/a>. \u041f\u0440\u043e\u0431\u0443\u0435\u043c \u043e\u0431\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0438 \u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0436\u0430\u0442\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u0438 &#171;\u0432\u044b\u043f\u043b\u044b\u043b\u0438&#187;. \u041d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<pre><code class=\"dart\">... IgnorePointer(   ignoring: !_isExpanded,   child: Transform(           transform: Matrix4.translationValues(             cos(0) * _translateButton.value,             -1 * sin(0) * _translateButton.value,             0,           ),           child: FloatingActionButton(             backgroundColor: Colors.tealAccent,             onPressed: () {               \/* Do something *\/             },             child: const Icon(               Icons.settings,             ),           ),         ),   ), ... <\/code><\/pre>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b, \u0447\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043a\u043b\u0430\u0441\u0441 Transform \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u0442 \u043d\u0435 \u0432\u0441\u044e \u043a\u043d\u043e\u043f\u043a\u0443, \u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0438 \u0432 \u0438\u0442\u043e\u0433\u0435 \u043d\u0430\u0436\u0430\u0442\u044c \u0435\u0435 \u043d\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. \u041f\u0440\u043e\u0431\u0443\u0435\u043c \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0435 \u043d\u0430 Positioned, \u043d\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u0432\u0441\u0435 \u0442\u0430\u043a \u0436\u0435 \u043d\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442.<\/p>\n<pre><code class=\"dart\">Positioned(   left: cos(3 * pi \/ 4) * _translateButton.value,   bottom: sin(3 * pi \/ 4) * _translateButton.value,   child: FloatingActionButton(        backgroundColor: Colors.red,        onPressed: () {          print(\"bbb\");        },        child: const Icon(          Icons.video_camera_back,        ),   ), ), <\/code><\/pre>\n<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044f \u0438\u0441\u043a\u0430\u0442\u044c, \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u044e, \u0447\u0442\u043e \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0435\u0441\u0442\u044c \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f. \u0423 \u0441\u0442\u0435\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0441 \u0441\u0430\u043c\u044b\u0439 \u0448\u0438\u0440\u043e\u043a\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432 \u043d\u0435\u043c \u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u044d\u0442\u0430 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043e\u0431\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u0442\u044d\u043a \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 c \u0448\u0438\u0440\u0438\u043d\u043e\u0439 \u0438 \u0432\u044b\u0441\u043e\u0442\u043e\u0439 200. \u0414\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0435\u0433\u043e \u0437\u0435\u043b\u0435\u043d\u043e\u0433\u043e \u0446\u0432\u0435\u0442\u0430 \u0430 \u043d\u0435 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u043c.<\/p>\n<figure class=\"float full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/065\/969\/fbf\/065969fbf7bdcc41953351370c8a583a.png\" width=\"1170\" height=\"2532\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/065\/969\/fbf\/065969fbf7bdcc41953351370c8a583a.png\"\/><figcaption><\/figcaption><\/figure>\n<p> \u0422\u0435\u043f\u0435\u0440\u044c \u043a\u043d\u043e\u043f\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0437\u0435\u043b\u0435\u043d\u043e\u0439 \u0437\u043e\u043d\u0435 \u043d\u0430\u0436\u0438\u043c\u0430\u044e\u0442\u0441\u044f! \u0420\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u043a\u043d\u043e\u043f\u043a\u0443-\u043c\u0435\u043d\u044e \u043f\u043e \u0446\u0435\u043d\u0442\u0440\u0443 \u0438 \u043f\u043e\u0434\u0433\u043e\u043d\u044f\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u0437\u0435\u043b\u0435\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043f\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0443. <\/p>\n<figure class=\"float full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b74\/9a4\/c25\/b749a4c254487165637b1097e95f53ce.png\" alt=\"\" title=\"\" width=\"1170\" height=\"2532\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b74\/9a4\/c25\/b749a4c254487165637b1097e95f53ce.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412\u0416\u0423\u0425 \u0438 \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. <\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/170\/068\/97e\/17006897e11e00da7204a267c76691f3.gif\" width=\"222\" height=\"480\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/170\/068\/97e\/17006897e11e00da7204a267c76691f3.gif\"\/><figcaption><\/figcaption><\/figure>\n<h2><\/h2>\n<pre><code class=\"dart\">import 'dart:math';  import 'package:flutter\/material.dart'; import 'package:latlong2\/latlong.dart';  class FloatingMenu extends StatefulWidget {   const FloatingMenu(this.duration, this.radius, {Key? key})       : super(key: key);    final int duration;   final double radius;    @override   _FloatingMenuState createState() => _FloatingMenuState(); }  class _FloatingMenuState extends State&lt;FloatingMenu>     with SingleTickerProviderStateMixin {   late AnimationController _animationController;    late Animation&lt;double> _buttonAnimatedIcon;    late Animation&lt;double> _translateButton;    bool _isExpanded = false;    @override   initState() {     _animationController = AnimationController(         vsync: this, duration: Duration(milliseconds: widget.duration))       ..addListener(() {         setState(() {});       });      _buttonAnimatedIcon =         Tween&lt;double>(begin: 0.0, end: 1.0).animate(_animationController);      _translateButton = Tween&lt;double>(       begin: 0,       end: widget.radius,     ).animate(CurvedAnimation(       parent: _animationController,       curve: Curves.easeInOut,     ));     super.initState();   }    @override   dispose() {     _animationController.dispose();     super.dispose();   }    _toggle() {     if (_isExpanded) {       _animationController.reverse();     } else {       _animationController.forward();     }     _isExpanded = !_isExpanded;   }    @override   Widget build(BuildContext context) {     double width = widget.radius * 2 + 60;     double height = widget.radius + 60;     double center = width\/2-30;     return Container(         height: height,         width: width,         child: Stack(           clipBehavior: Clip.none,           children: [             Positioned(               left: center + cos(pi) * _translateButton.value,               bottom: sin(pi) * _translateButton.value,               child: FloatingActionButton(                 backgroundColor: Colors.blue,                 onPressed: () {                   print(\"aaa\");                 },                 child: const Icon(                   Icons.photo_camera,                 ),               ),             ),             Positioned(               left: center + cos(3 * pi \/ 4) * _translateButton.value,               bottom: sin(3 * pi \/ 4) * _translateButton.value,               child: FloatingActionButton(                 backgroundColor: Colors.red,                 onPressed: () {                   print(\"bbb\");                   \/* Do something *\/                 },                 child: const Icon(                   Icons.video_camera_back,                 ),               ),             ),             Positioned(               left: center + cos(pi \/ 2) * _translateButton.value,               bottom: sin(pi \/ 2) * _translateButton.value,               child: FloatingActionButton(                 backgroundColor: Colors.amber,                 onPressed: () {                   print(\"ccc\");                   \/* Do something *\/                 },                 child: const Icon(Icons.photo),               ),             ),             Positioned(               left: center + cos(pi \/ 4) * _translateButton.value,               bottom: sin(pi \/ 4) * _translateButton.value,               child: FloatingActionButton(                 backgroundColor: Colors.deepPurpleAccent,                 onPressed: () {                   print(\"ddd\");                   \/* Do something *\/                 },                 child: const Icon(                   Icons.people_alt_outlined,                 ),               ),             ),             Positioned(               left: center + cos(0) * _translateButton.value,               bottom: sin(0) * _translateButton.value,               child: FloatingActionButton(                 backgroundColor: Colors.tealAccent,                 onPressed: () {                   print(\"eee\");                   \/* Do something *\/                 },                 child: const Icon(                   Icons.settings,                 ),               ),             ),             Positioned(               left: center,               bottom: 0,               child: FloatingActionButton(                 onPressed: _toggle,                 child: AnimatedIcon(                   icon: AnimatedIcons.menu_close,                   progress: _buttonAnimatedIcon,                 ),               ),             )           ],         ));   } } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/690180\/\"> https:\/\/habr.com\/ru\/post\/690180\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u043c\u043d\u0435 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043c\u0435\u043d\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044e \u043d\u0430 floating button. \u041d\u0430\u0447\u0430\u043b \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0447\u0442\u043e \u0442\u0430\u043c \u0442\u0430\u043a\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0432 \u044d\u0442\u0438\u0445 \u0432\u0430\u0448\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430\u0445. \u041c\u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043a\u0430\u043a \u0432 \u0441\u0430\u043c\u0441\u0443\u043d\u0433\u0435 \u043c\u0435\u043d\u044e \u0434\u043b\u044f \u0441\u0442\u0438\u043b\u0443\u0441\u0430. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044f \u043d\u0435 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b, \u043a\u0430\u043a \u044d\u0442\u043e \u0433\u0443\u0433\u043b\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u044f \u043d\u0435 \u043d\u0430\u0448\u0435\u043b \u0442\u0430\u043a\u043e\u0433\u043e \u043c\u0435\u043d\u044e \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0438\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0433\u043e \u0441\u0430\u043c. <\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h2>\u0410\u043d\u0438\u043c\u0430\u0446\u0438\u044f<\/h2>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0432\u043e \u0444\u043b\u0430\u0442\u0442\u0435\u0440\u0435 \u044f \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u043b, \u044f \u043d\u0430\u0448\u0435\u043b \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 <a href=\"https:\/\/www.kindacode.com\/article\/flutter-floating-action-button\/\" rel=\"noopener noreferrer nofollow\">\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438<\/a>. \u041f\u043e-\u043d\u0430\u0447\u0430\u043b\u0443 \u044f \u0434\u0443\u043c\u0430\u043b \u0447\u0442\u043e \u043d\u0430\u0434\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0438\u0445 \u043a\u043d\u043e\u043f\u043e\u043a \u0438 \u0442\u0440\u0430\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0438\u0445 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f, \u043d\u043e \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u043a\u043d\u043e\u043f\u043a\u0438 \u0432\u044b\u043f\u043b\u044b\u0432\u0430\u044e\u0442 \u0438\u0437-\u0437\u0430 \u043a\u0440\u0430\u044f \u044d\u043a\u0440\u0430\u043d\u0430. \u041c\u043d\u0435 \u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0447\u0442\u043e\u0431\u044b \u043a\u043d\u043e\u043f\u043a\u0438 \u043f\u0440\u044f\u0442\u0430\u043b\u0438\u0441\u044c \u043f\u043e\u0434 floating action button. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b \u043a\u043e\u0434, \u0438 \u0442\u0430\u043a\u043e\u0435 \u0441\u043a\u0440\u044b\u0442\u0438\u0435 \u043a\u043d\u043e\u043f\u043e\u043a \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0438\u0437-\u0437\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0438\u0434\u0436\u0435\u0442\u0430 Column, \u043d\u043e \u0432\u0435\u0434\u044c \u0435\u0441\u0442\u044c Stack. <\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 \u043f\u043e \u043a\u0440\u0443\u0433\u0443 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u043c \u0438\u0437 \u043f\u043e\u043b\u044f\u0440\u043d\u044b\u0445 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u0432 \u0434\u0435\u043a\u0430\u0440\u0442\u043e\u0432\u044b. \u0410\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0435\u0437\u0434 \u043a\u043d\u043e\u043f\u043e\u043a \u0431\u0443\u0434\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0440\u0430\u0434\u0438\u0443\u0441\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043a\u043b\u0430\u0441\u0441\u043e\u0432 AnimationController \u0438 Tween. \u0412 AnimationController \u0443\u043a\u0430\u0436\u0435\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438, \u0430 \u0432 Tween \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0440\u0430\u0434\u0438\u0443\u0441\u0430 \u043e\u0442 0 \u0434\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e. \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0434\u0438\u0443\u0441 \u0438 \u0432\u0440\u0435\u043c\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u043c \u0438\u0437\u0432\u043d\u0435. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u0432 Stack \u043f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u043c FloatingActionButton, \u043f\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044e \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f.<\/p>\n<pre><code class=\"dart\">class FloatingMenu extends StatefulWidget {   const FloatingMenu(this.duration, this.radius, {Key? key})       : super(key: key);    final int duration;   final double radius;    @override   _FloatingMenuState createState() => _FloatingMenuState(); }  class _FloatingMenuState extends State&lt;FloatingMenu>     with SingleTickerProviderStateMixin {   late AnimationController _animationController;    late Animation&lt;double> _buttonAnimatedIcon;    late Animation&lt;double> _translateButton;    bool _isExpanded = false;    @override   initState() {     _animationController = AnimationController(         vsync: this, duration: Duration(milliseconds: widget.duration))       ..addListener(() {         setState(() {});       });      _buttonAnimatedIcon =         Tween&lt;double>(begin: 0.0, end: 1.0).animate(_animationController);      _translateButton = Tween&lt;double>(       begin: 0,       end: widget.radius,     ).animate(CurvedAnimation(       parent: _animationController,       curve: Curves.easeInOut,     ));     super.initState();   }    @override   dispose() {     _animationController.dispose();     super.dispose();   }    _toggle() {     if (_isExpanded) {       _animationController.reverse();     } else {       _animationController.forward();     }     _isExpanded = !_isExpanded;   }    @override   Widget build(BuildContext context) {     return Stack(       children: [         Transform(           transform: Matrix4.translationValues(             cos(pi) * _translateButton.value,             -1 * sin(pi) * _translateButton.value,             0,           ),           child: FloatingActionButton(             backgroundColor: Colors.blue,             onPressed: () {               \/* Do something *\/             },             child: const Icon(               Icons.photo_camera,             ),           ),         ),         Transform(           transform: Matrix4.translationValues(             cos(3 * pi \/ 4) * _translateButton.value,             -1 * sin(3 * pi \/ 4) * _translateButton.value,             0,           ),           child: FloatingActionButton(             backgroundColor: Colors.red,             onPressed: () {               \/* Do something *\/             },             child: const Icon(               Icons.video_camera_back,             ),           ),         ),         Transform(           transform: Matrix4.translationValues(             cos(pi \/ 2) * _translateButton.value,             -1 * sin(pi \/ 2) * _translateButton.value,             0,           ),           child: FloatingActionButton(             backgroundColor: Colors.amber,             onPressed: () {               \/* Do something *\/             },             child: const Icon(Icons.photo),           ),         ),         Transform(           transform: Matrix4.translationValues(             cos(pi \/ 4) * _translateButton.value,             -1 * sin(pi \/ 4) * _translateButton.value,             0,           ),           child: FloatingActionButton(             backgroundColor: Colors.deepPurpleAccent,             onPressed: () {               \/* Do something *\/             },             child: const Icon(               Icons.people_alt_outlined,             ),           ),         ),         Transform(           transform: Matrix4.translationValues(             cos(0) * _translateButton.value,             -1 * sin(0) * _translateButton.value,             0,           ),           child: FloatingActionButton(             backgroundColor: Colors.tealAccent,             onPressed: () {               \/* Do something *\/             },             child: const Icon(               Icons.settings,             ),           ),         ),         child: FloatingActionButton(           onPressed: _toggle,           child: AnimatedIcon(             icon: AnimatedIcons.menu_close,              progress: _buttonAnimatedIcon,             ),         ),       ],     );   } } <\/code><\/pre>\n<p>\u0423\u0440\u0430, \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u0434\u0435\u043b\u0430\u0435\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u043e \u0447\u0442\u043e \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e! \u041d\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043a\u043d\u043e\u043f\u043a\u0438 \u0442\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c, \u043d\u043e \u043d\u0430\u0436\u0430\u0442\u044c \u043d\u0430 \u043d\u0438\u0445 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. <\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<h2>\u0421\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435 \u0432\u0435\u043b\u0438<\/h2>\n<p>\u0418\u0442\u0430\u043a, \u0438\u0449\u0435\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443. \u041f\u0435\u0440\u0432\u043e\u0435 \u0447\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443, \u0447\u0442\u043e \u0441\u0442\u044d\u043a \u0434\u0430\u0435\u0442 \u043d\u0430\u0436\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u044d\u0442\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c. \u0412 \u0441\u0430\u043c\u043e\u043c \u0441\u0442\u044d\u043a\u0435 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0444\u043b\u0430\u0433\u043e\u0432, \u043d\u043e \u0432 \u0444\u043b\u0430\u0442\u0442\u0435\u0440\u0435 \u0442\u0430\u043a\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043a\u043b\u0430\u0441\u0441 <a href=\"https:\/\/api.flutter.dev\/flutter\/widgets\/IgnorePointer-class.html\" rel=\"noopener noreferrer nofollow\">IgnorePointer<\/a>. \u041f\u0440\u043e\u0431\u0443\u0435\u043c \u043e\u0431\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0438 \u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0436\u0430\u0442\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u0438 &#171;\u0432\u044b\u043f\u043b\u044b\u043b\u0438&#187;. \u041d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<pre><code class=\"dart\">... IgnorePointer(   ignoring: !_isExpanded,   child: Transform(           transform: Matrix4.translationValues(             cos(0) * _translateButton.value,             -1 * sin(0) * _translateButton.value,             0,           ),           child: FloatingActionButton(             backgroundColor: Colors.tealAccent,             onPressed: () {               \/* Do something *\/             },             child: const Icon(               Icons.settings,             ),           ),         ),   ), ... <\/code><\/pre>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b, \u0447\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043a\u043b\u0430\u0441\u0441 Transform \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u0442 \u043d\u0435 \u0432\u0441\u044e \u043a\u043d\u043e\u043f\u043a\u0443, \u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0438 \u0432 \u0438\u0442\u043e\u0433\u0435 \u043d\u0430\u0436\u0430\u0442\u044c \u0435\u0435 \u043d\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. \u041f\u0440\u043e\u0431\u0443\u0435\u043c \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0435 \u043d\u0430 Positioned, \u043d\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u0432\u0441\u0435 \u0442\u0430\u043a \u0436\u0435 \u043d\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442.<\/p>\n<pre><code class=\"dart\">Positioned(   left: cos(3 * pi \/ 4) * _translateButton.value,   bottom: sin(3 * pi \/ 4) * _translateButton.value,   child: FloatingActionButton(        backgroundColor: Colors.red,        onPressed: () {          print(\"bbb\");        },        child: const Icon(          Icons.video_camera_back,        ),   ), ), <\/code><\/pre>\n<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044f \u0438\u0441\u043a\u0430\u0442\u044c, \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u044e, \u0447\u0442\u043e \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0435\u0441\u0442\u044c \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f. \u0423 \u0441\u0442\u0435\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0441 \u0441\u0430\u043c\u044b\u0439 \u0448\u0438\u0440\u043e\u043a\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432 \u043d\u0435\u043c \u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u044d\u0442\u0430 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043e\u0431\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u0442\u044d\u043a \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 c \u0448\u0438\u0440\u0438\u043d\u043e\u0439 \u0438 \u0432\u044b\u0441\u043e\u0442\u043e\u0439 200. \u0414\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0435\u0433\u043e \u0437\u0435\u043b\u0435\u043d\u043e\u0433\u043e \u0446\u0432\u0435\u0442\u0430 \u0430 \u043d\u0435 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u043c.<\/p>\n<figure class=\"float full-width\"><figcaption><\/figcaption><\/figure>\n<p> \u0422\u0435\u043f\u0435\u0440\u044c \u043a\u043d\u043e\u043f\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0437\u0435\u043b\u0435\u043d\u043e\u0439 \u0437\u043e\u043d\u0435 \u043d\u0430\u0436\u0438\u043c\u0430\u044e\u0442\u0441\u044f! \u0420\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u043a\u043d\u043e\u043f\u043a\u0443-\u043c\u0435\u043d\u044e \u043f\u043e \u0446\u0435\u043d\u0442\u0440\u0443 \u0438 \u043f\u043e\u0434\u0433\u043e\u043d\u044f\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u0437\u0435\u043b\u0435\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043f\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0443. <\/p>\n<figure class=\"float full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0412\u0416\u0423\u0425 \u0438 \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. <\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<h2><\/h2>\n<pre><code class=\"dart\">import 'dart:math';  import 'package:flutter\/material.dart'; import 'package:latlong2\/latlong.dart';  class FloatingMenu extends StatefulWidget {   const FloatingMenu(this.duration, this.radius, {Key? key})       : super(key: key);    final int duration;   final double radius;    @override   _FloatingMenuState createState() => _FloatingMenuState(); }  class _FloatingMenuState extends State&lt;FloatingMenu>     with SingleTickerProviderStateMixin {   late AnimationController _animationController;    late Animation&lt;double> _buttonAnimatedIcon;    late Animation&lt;double> _translateButton;    bool _isExpanded = false;    @override   initState() {     _animationController = AnimationController(         vsync: this, duration: Duration(milliseconds: widget.duration))       ..addListener(() {         setState(() {});       });      _buttonAnimatedIcon =         Tween&lt;double>(begin: 0.0, end: 1.0).animate(_animationController);      _translateButton = Tween&lt;double>(       begin: 0,       end: widget.radius,     ).animate(CurvedAnimation(       parent: _animationController,       curve: Curves.easeInOut,     ));     super.initState();   }    @override   dispose() {     _animationController.dispose();     super.dispose();   }    _toggle() {     if (_isExpanded) {       _animationController.reverse();     } else {       _animationController.forward();     }     _isExpanded = !_isExpanded;   }    @override   Widget build(BuildContext context) {     double width = widget.radius * 2 + 60;     double height = widget.radius + 60;     double center = width\/2-30;     return Container(         height: height,         width: width,         child: Stack(           clipBehavior: Clip.none,           children: [             Positioned(               left: center + cos(pi) * _translateButton.value,               bottom: sin(pi) * _translateButton.value,               child: FloatingActionButton(                 backgroundColor: Colors.blue,                 onPressed: () {                   print(\"aaa\");                 },                 child: const Icon(                   Icons.photo_camera,                 ),               ),             ),             Positioned(               left: center + cos(3 * pi \/ 4) * _translateButton.value,               bottom: sin(3 * pi \/ 4) * _translateButton.value,               child: FloatingActionButton(                 backgroundColor: Colors.red,                 onPressed: () {                   print(\"bbb\");                   \/* Do something *\/                 },                 child: const Icon(                   Icons.video_camera_back,                 ),               ),             ),             Positioned(               left: center + cos(pi \/ 2) * _translateButton.value,               bottom: sin(pi \/ 2) * _translateButton.value,               child: FloatingActionButton(        <\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-338931","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/338931","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=338931"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/338931\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=338931"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=338931"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=338931"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}