mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 11:08:03 +08:00
opt: m3e loading (#1877)
* opt: loading * feat: refresh m3e * restore refreshIndicator --------- Co-authored-by: dom <githubaccount56556@proton.me>
This commit is contained in:
committed by
GitHub
parent
f0050dd6e6
commit
886c53c7d8
41
lib/common/widgets/loading_widget/morphs.dart
Normal file
41
lib/common/widgets/loading_widget/morphs.dart
Normal file
@@ -0,0 +1,41 @@
|
||||
import 'package:material_new_shapes/material_new_shapes.dart';
|
||||
|
||||
abstract final class Morphs {
|
||||
static List<Morph> buildMorph(
|
||||
List<RoundedPolygon> shapes, {
|
||||
bool loop = true,
|
||||
}) {
|
||||
assert(shapes.length >= 2);
|
||||
return [
|
||||
for (var i = 0; i < shapes.length - 1; i++)
|
||||
Morph(shapes[i], shapes[i + 1]),
|
||||
if (loop) Morph(shapes[shapes.length - 1], shapes[0]),
|
||||
];
|
||||
}
|
||||
|
||||
static final loadingMorphs = buildMorph([
|
||||
MaterialShapes.softBurst,
|
||||
MaterialShapes.cookie9Sided,
|
||||
MaterialShapes.pentagon,
|
||||
MaterialShapes.pill,
|
||||
MaterialShapes.sunny,
|
||||
MaterialShapes.cookie4Sided,
|
||||
MaterialShapes.oval,
|
||||
]);
|
||||
|
||||
// static final refreshMorphs = buildMorph([
|
||||
// MaterialShapes.softBurst,
|
||||
// MaterialShapes.cookie9Sided,
|
||||
// MaterialShapes.gem,
|
||||
// MaterialShapes.flower,
|
||||
// MaterialShapes.sunny,
|
||||
// MaterialShapes.cookie4Sided,
|
||||
// MaterialShapes.oval,
|
||||
// MaterialShapes.cookie12Sided,
|
||||
// ]);
|
||||
|
||||
// static final manualMorph = Morph(
|
||||
// MaterialShapes.circle,
|
||||
// MaterialShapes.softBurst,
|
||||
// );
|
||||
}
|
||||
Reference in New Issue
Block a user