This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @override | |
| Widget build(BuildContext context) { | |
| return Center( | |
| child: Stack( | |
| children: [ | |
| CustomPaint( | |
| size: const Size(200.0, 200.0), | |
| painter: MyPainter( | |
| progress: _controller.value, | |
| defaultColor: Colors.grey, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'dart:math'; | |
| import 'package:flutter/material.dart'; | |
| class RingPainter extends StatefulWidget { | |
| const RingPainter({Key? key}) : super(key: key); | |
| @override | |
| State<RingPainter> createState() => _RingPainterState(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @override | |
| void paint(Canvas canvas, Size size) { | |
| final strokeWidth = size.width / 15.0; | |
| final circleCenter = Offset(size.width / 2, size.height / 2); | |
| final circleRadius = (size.width - strokeWidth) / 2; | |
| final paint = Paint() | |
| ..color = Colors.grey | |
| ..strokeWidth = strokeWidth | |
| ..style = PaintingStyle.stroke; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @override | |
| void paint(Canvas canvas, Size size) { | |
| final strokeWidth = size.width / 15.0; | |
| final circleCenter = Offset(size.width / 2, size.height / 2); | |
| final circleRadius = (size.width - strokeWidth) / 2; | |
| final paint = Paint() | |
| ..color = Colors.grey | |
| ..strokeWidth = strokeWidth | |
| ..style = PaintingStyle.stroke; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class RingPainter extends StatelessWidget { | |
| const RingPainter({Key? key}) : super(key: key); | |
| @override | |
| Widget build(BuildContext context) { | |
| return Center( | |
| child: CustomPaint( | |
| size: Size(200.0, 200.0), | |
| painter: MyPainter(), | |
| ), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:flutter/material.dart'; | |
| enum Options { search, upload, copy, exit } | |
| void main() { | |
| runApp(const MyApp()); | |
| } | |
| class MyApp extends StatefulWidget { | |
| const MyApp({Key? key}) : super(key: key); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| enum Options { search, upload, copy, exit } | |
| void main() { | |
| runApp(const MyApp()); | |
| } | |
| class MyApp extends StatefulWidget { | |
| const MyApp({Key? key}) : super(key: key); | |
| @override |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| _buildAppBar() { | |
| return AppBar( | |
| title: const Text( | |
| 'Popup Menus', | |
| style: TextStyle(color: Colors.white, fontSize: 16.0), | |
| ), | |
| actions: [ | |
| PopupMenuButton( | |
| itemBuilder: (ctx) => [ | |
| _buildPopupMenuItem('Search', Icons.search), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| _buildAppBar() { | |
| return AppBar( | |
| title: const Text( | |
| 'Popup Menus', | |
| style: TextStyle(color: Colors.white, fontSize: 16.0), | |
| ), | |
| actions: [ | |
| PopupMenuButton( | |
| itemBuilder: (ctx) => [ | |
| _buildPopupMenuItem('Search'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:flutter/material.dart'; | |
| enum Options { search, upload, copy, exit } | |
| void main() { | |
| runApp(const MyApp()); | |
| } | |
| class MyApp extends StatefulWidget { | |
| const MyApp({Key? key}) : super(key: key); |