mirror of
https://github.com/smmarty/friflex_flutter_starter.git
synced 2025-12-22 01:20:46 +00:00
feat(app): Добавить fluttergen (#3)
Co-authored-by: PetrovY <y.petrov@friflex.com>
This commit is contained in:
135
lib/gen/assets.gen.dart
Normal file
135
lib/gen/assets.gen.dart
Normal file
@@ -0,0 +1,135 @@
|
||||
/// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
/// *****************************************************
|
||||
/// FlutterGen
|
||||
/// *****************************************************
|
||||
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal,deprecated_member_use
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart' as _svg;
|
||||
import 'package:vector_graphics/vector_graphics.dart' as _vg;
|
||||
|
||||
class $AssetsFontsGen {
|
||||
const $AssetsFontsGen();
|
||||
|
||||
/// File path: assets/fonts/Montserrat-Bold.ttf
|
||||
String get montserratBold => 'assets/fonts/Montserrat-Bold.ttf';
|
||||
|
||||
/// File path: assets/fonts/Montserrat-ExtraBold.ttf
|
||||
String get montserratExtraBold => 'assets/fonts/Montserrat-ExtraBold.ttf';
|
||||
|
||||
/// File path: assets/fonts/Montserrat-Medium.ttf
|
||||
String get montserratMedium => 'assets/fonts/Montserrat-Medium.ttf';
|
||||
|
||||
/// File path: assets/fonts/Montserrat-Regular.ttf
|
||||
String get montserratRegular => 'assets/fonts/Montserrat-Regular.ttf';
|
||||
|
||||
/// File path: assets/fonts/Montserrat-SemiBold.ttf
|
||||
String get montserratSemiBold => 'assets/fonts/Montserrat-SemiBold.ttf';
|
||||
|
||||
/// List of all assets
|
||||
List<String> get values => [
|
||||
montserratBold,
|
||||
montserratExtraBold,
|
||||
montserratMedium,
|
||||
montserratRegular,
|
||||
montserratSemiBold
|
||||
];
|
||||
}
|
||||
|
||||
class $AssetsIconsGen {
|
||||
const $AssetsIconsGen();
|
||||
|
||||
/// File path: assets/icons/home.svg
|
||||
SvgGenImage get home => const SvgGenImage('assets/icons/home.svg');
|
||||
|
||||
/// List of all assets
|
||||
List<SvgGenImage> get values => [home];
|
||||
}
|
||||
|
||||
class Assets {
|
||||
Assets._();
|
||||
|
||||
static const $AssetsFontsGen fonts = $AssetsFontsGen();
|
||||
static const $AssetsIconsGen icons = $AssetsIconsGen();
|
||||
}
|
||||
|
||||
class SvgGenImage {
|
||||
const SvgGenImage(
|
||||
this._assetName, {
|
||||
this.size,
|
||||
this.flavors = const {},
|
||||
}) : _isVecFormat = false;
|
||||
|
||||
const SvgGenImage.vec(
|
||||
this._assetName, {
|
||||
this.size,
|
||||
this.flavors = const {},
|
||||
}) : _isVecFormat = true;
|
||||
|
||||
final String _assetName;
|
||||
final Size? size;
|
||||
final Set<String> flavors;
|
||||
final bool _isVecFormat;
|
||||
|
||||
_svg.SvgPicture svg({
|
||||
Key? key,
|
||||
bool matchTextDirection = false,
|
||||
AssetBundle? bundle,
|
||||
String? package,
|
||||
double? width,
|
||||
double? height,
|
||||
BoxFit fit = BoxFit.contain,
|
||||
AlignmentGeometry alignment = Alignment.center,
|
||||
bool allowDrawingOutsideViewBox = false,
|
||||
WidgetBuilder? placeholderBuilder,
|
||||
String? semanticsLabel,
|
||||
bool excludeFromSemantics = false,
|
||||
_svg.SvgTheme? theme,
|
||||
ColorFilter? colorFilter,
|
||||
Clip clipBehavior = Clip.hardEdge,
|
||||
@deprecated Color? color,
|
||||
@deprecated BlendMode colorBlendMode = BlendMode.srcIn,
|
||||
@deprecated bool cacheColorFilter = false,
|
||||
}) {
|
||||
final _svg.BytesLoader loader;
|
||||
if (_isVecFormat) {
|
||||
loader = _vg.AssetBytesLoader(
|
||||
_assetName,
|
||||
assetBundle: bundle,
|
||||
packageName: package,
|
||||
);
|
||||
} else {
|
||||
loader = _svg.SvgAssetLoader(
|
||||
_assetName,
|
||||
assetBundle: bundle,
|
||||
packageName: package,
|
||||
theme: theme,
|
||||
);
|
||||
}
|
||||
return _svg.SvgPicture(
|
||||
loader,
|
||||
key: key,
|
||||
matchTextDirection: matchTextDirection,
|
||||
width: width,
|
||||
height: height,
|
||||
fit: fit,
|
||||
alignment: alignment,
|
||||
allowDrawingOutsideViewBox: allowDrawingOutsideViewBox,
|
||||
placeholderBuilder: placeholderBuilder,
|
||||
semanticsLabel: semanticsLabel,
|
||||
excludeFromSemantics: excludeFromSemantics,
|
||||
colorFilter: colorFilter ??
|
||||
(color == null ? null : ColorFilter.mode(color, colorBlendMode)),
|
||||
clipBehavior: clipBehavior,
|
||||
cacheColorFilter: cacheColorFilter,
|
||||
);
|
||||
}
|
||||
|
||||
String get path => _assetName;
|
||||
|
||||
String get keyName => _assetName;
|
||||
}
|
||||
15
lib/gen/fonts.gen.dart
Normal file
15
lib/gen/fonts.gen.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
/// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
/// *****************************************************
|
||||
/// FlutterGen
|
||||
/// *****************************************************
|
||||
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal,deprecated_member_use
|
||||
|
||||
class FontFamily {
|
||||
FontFamily._();
|
||||
|
||||
/// Font family: Montserrat
|
||||
static const String montserrat = 'Montserrat';
|
||||
}
|
||||
Reference in New Issue
Block a user