feat : new UI
This commit is contained in:
@@ -10,16 +10,17 @@
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart' as _svg;
|
||||
import 'package:lottie/lottie.dart' as _lottie;
|
||||
import 'package:vector_graphics/vector_graphics.dart' as _vg;
|
||||
|
||||
class $AssetsAnimGen {
|
||||
const $AssetsAnimGen();
|
||||
|
||||
/// File path: assets/anim/loading.json
|
||||
String get loading => 'assets/anim/loading.json';
|
||||
LottieGenImage get loading => const LottieGenImage('assets/anim/loading.json');
|
||||
|
||||
/// List of all assets
|
||||
List<String> get values => [loading];
|
||||
List<LottieGenImage> get values => [loading];
|
||||
}
|
||||
|
||||
class $AssetsIconsGen {
|
||||
@@ -733,3 +734,69 @@ class SvgGenImage {
|
||||
|
||||
String get keyName => _assetName;
|
||||
}
|
||||
|
||||
class LottieGenImage {
|
||||
const LottieGenImage(this._assetName, {this.flavors = const {}});
|
||||
|
||||
final String _assetName;
|
||||
final Set<String> flavors;
|
||||
|
||||
_lottie.LottieBuilder lottie({
|
||||
Animation<double>? controller,
|
||||
bool? animate,
|
||||
_lottie.FrameRate? frameRate,
|
||||
bool? repeat,
|
||||
bool? reverse,
|
||||
_lottie.LottieDelegates? delegates,
|
||||
_lottie.LottieOptions? options,
|
||||
void Function(_lottie.LottieComposition)? onLoaded,
|
||||
_lottie.LottieImageProviderFactory? imageProviderFactory,
|
||||
Key? key,
|
||||
AssetBundle? bundle,
|
||||
Widget Function(BuildContext, Widget, _lottie.LottieComposition?)? frameBuilder,
|
||||
ImageErrorWidgetBuilder? errorBuilder,
|
||||
double? width,
|
||||
double? height,
|
||||
BoxFit? fit,
|
||||
AlignmentGeometry? alignment,
|
||||
String? package,
|
||||
bool? addRepaintBoundary,
|
||||
FilterQuality? filterQuality,
|
||||
void Function(String)? onWarning,
|
||||
_lottie.LottieDecoder? decoder,
|
||||
_lottie.RenderCache? renderCache,
|
||||
bool? backgroundLoading,
|
||||
}) {
|
||||
return _lottie.Lottie.asset(
|
||||
_assetName,
|
||||
controller: controller,
|
||||
animate: animate,
|
||||
frameRate: frameRate,
|
||||
repeat: repeat,
|
||||
reverse: reverse,
|
||||
delegates: delegates,
|
||||
options: options,
|
||||
onLoaded: onLoaded,
|
||||
imageProviderFactory: imageProviderFactory,
|
||||
key: key,
|
||||
bundle: bundle,
|
||||
frameBuilder: frameBuilder,
|
||||
errorBuilder: errorBuilder,
|
||||
width: width,
|
||||
height: height,
|
||||
fit: fit,
|
||||
alignment: alignment,
|
||||
package: package,
|
||||
addRepaintBoundary: addRepaintBoundary,
|
||||
filterQuality: filterQuality,
|
||||
onWarning: onWarning,
|
||||
decoder: decoder,
|
||||
renderCache: renderCache,
|
||||
backgroundLoading: backgroundLoading,
|
||||
);
|
||||
}
|
||||
|
||||
String get path => _assetName;
|
||||
|
||||
String get keyName => _assetName;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user