mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-31 08:08:19 +08:00
@@ -15,7 +15,6 @@
|
|||||||
* along with PiliPlus. If not, see <https://www.gnu.org/licenses/>.
|
* along with PiliPlus. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import 'dart:io' show Platform;
|
|
||||||
import 'dart:math' show pi;
|
import 'dart:math' show pi;
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@@ -95,53 +94,29 @@ class RenderLoadingIndicator extends RenderBox {
|
|||||||
final radius = size.width / 2 - strokeWidth;
|
final radius = size.width / 2 - strokeWidth;
|
||||||
final center = size.center(.zero);
|
final center = size.center(.zero);
|
||||||
|
|
||||||
// TODO: remove
|
context.canvas
|
||||||
// https://github.com/flutter/flutter/issues/182708
|
..drawCircle(
|
||||||
// https://github.com/flutter/flutter/issues/183083
|
center,
|
||||||
if (Platform.isIOS) {
|
radius,
|
||||||
context.canvas
|
paint
|
||||||
..drawCircle(
|
..style = .fill
|
||||||
center,
|
..color = const Color(0x80000000),
|
||||||
radius,
|
)
|
||||||
paint..color = Colors.white,
|
..drawCircle(
|
||||||
)
|
center,
|
||||||
..drawCircle(
|
radius,
|
||||||
center,
|
paint
|
||||||
radius - strokeWidth,
|
..style = .stroke
|
||||||
paint..color = const Color(0x80000000),
|
..strokeWidth = strokeWidth
|
||||||
)
|
..color = Colors.white,
|
||||||
..drawArc(
|
)
|
||||||
Rect.fromCircle(center: center, radius: radius - padding),
|
..drawArc(
|
||||||
startAngle,
|
Rect.fromCircle(center: center, radius: radius - padding),
|
||||||
progress * 2 * pi,
|
startAngle,
|
||||||
true,
|
progress * 2 * pi,
|
||||||
paint..color = Colors.white,
|
true,
|
||||||
);
|
paint..style = .fill,
|
||||||
} else {
|
);
|
||||||
context.canvas
|
|
||||||
..drawCircle(
|
|
||||||
center,
|
|
||||||
radius,
|
|
||||||
paint
|
|
||||||
..style = .fill
|
|
||||||
..color = const Color(0x80000000),
|
|
||||||
)
|
|
||||||
..drawCircle(
|
|
||||||
center,
|
|
||||||
radius,
|
|
||||||
paint
|
|
||||||
..style = .stroke
|
|
||||||
..strokeWidth = strokeWidth
|
|
||||||
..color = Colors.white,
|
|
||||||
)
|
|
||||||
..drawArc(
|
|
||||||
Rect.fromCircle(center: center, radius: radius - padding),
|
|
||||||
startAngle,
|
|
||||||
progress * 2 * pi,
|
|
||||||
true,
|
|
||||||
paint..style = .fill,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ version: 2.0.1+1
|
|||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=3.10.0"
|
sdk: ">=3.10.0"
|
||||||
flutter: 3.41.4 # update `.fvmrc` config
|
flutter: 3.41.5 # update `.fvmrc` config
|
||||||
|
|
||||||
# Dependencies specify other packages that your package needs in order to work.
|
# Dependencies specify other packages that your package needs in order to work.
|
||||||
# To automatically upgrade your package dependencies to the latest versions
|
# To automatically upgrade your package dependencies to the latest versions
|
||||||
|
|||||||
Reference in New Issue
Block a user