коммит для ани хихик

This commit is contained in:
kamilia 2024-10-16 22:41:37 +04:00
parent 1e6e02e9a0
commit b42249b048
27 changed files with 316 additions and 170 deletions

6
I10n.yaml Normal file
View File

@ -0,0 +1,6 @@
arb-dir: l10n
template-arb-file: app_ru.arb
output-localization-file: app_locale.dart
output-dir: lib/components/locale/l10n
output-class: AppLocale
synthetic-package: false

Binary file not shown.

Before

Width:  |  Height:  |  Size: 544 B

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 442 B

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 721 B

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 20 KiB

9
l10n/app_en.arb Normal file
View File

@ -0,0 +1,9 @@
{
"@@locale": "en",
"search": "Search",
"liked": "liked!",
"disliked": "disliked :(",
"arbEnding": "Чтобы не забыть про отсутствие запятой :)"
}

9
l10n/app_ru.arb Normal file
View File

@ -0,0 +1,9 @@
{
"@@locale": "ru",
"search": "Поиск",
"cardLiked": "Добавлено в понравившиеся :)",
"cardDisliked": "Удалено из понравившегося :(",
"arbEnding": "Чтобы не забыть про отсутствие запятой :)"
}

View File

@ -10,11 +10,11 @@ class Debounce {
static Timer? _timer; static Timer? _timer;
static void run ( static void run(
VoidCallback action, { VoidCallback action, {
Duration delay = const Duration(milliseconds: 500), Duration delay = const Duration(milliseconds: 500),
}) { }) {
_timer?.cancel(); _timer?.cancel();
_timer = Timer(delay, action); _timer = Timer(delay, action);
} }
} }

View File

@ -57,4 +57,4 @@ class PaginationDto {
const PaginationDto({this.current, this.next, this.last}); const PaginationDto({this.current, this.next, this.last});
factory PaginationDto.fromJson(Map<String, dynamic> json) => _$PaginationDtoFromJson(json); factory PaginationDto.fromJson(Map<String, dynamic> json) => _$PaginationDtoFromJson(json);
} }

View File

@ -7,25 +7,25 @@ const _imagePlaceholder =
extension CharactersDtoToModel on CharactersDto { extension CharactersDtoToModel on CharactersDto {
HomeData toDomain() => HomeData( HomeData toDomain() => HomeData(
data: data?.map((e) => e.toDomain()).toList(), data: data?.map((e) => e.toDomain()).toList(),
nextPage: meta?.pagination?.next, nextPage: meta?.pagination?.next,
); );
} }
extension CharacterDataDtoToModel on CharacterDataDto { extension CharacterDataDtoToModel on CharacterDataDto {
CardData toDomain() => CardData( CardData toDomain() => CardData(
attributes?.name ?? 'UNKNOWN', attributes?.name ?? 'UNKNOWN',
imageUrl: attributes?.image ?? _imagePlaceholder, imageUrl: attributes?.image ?? _imagePlaceholder,
descriptionText: _makeDescriptionText(attributes?.born, attributes?.died), descriptionText: _makeDescriptionText(attributes?.born, attributes?.died),
); );
String _makeDescriptionText(String? born, String? died) { String _makeDescriptionText(String? born, String? died) {
return born != null && died != null return born != null && died != null
? '$born - $died' ? '$born - $died'
: born != null : born != null
? 'born: $born' ? 'born: $born'
: died != null : died != null
? 'died: $died' ? 'died: $died'
: ''; : '';
} }
} }

View File

@ -5,4 +5,4 @@ typedef OnErrorCallback = void Function(String? error);
abstract class ApiInterface { abstract class ApiInterface {
Future<HomeData?> loadData({OnErrorCallback? onError}); Future<HomeData?> loadData({OnErrorCallback? onError});
} }

View File

@ -12,14 +12,14 @@ class MockRepository extends ApiInterface {
'Freeze', 'Freeze',
descriptionText: 'so cold..', descriptionText: 'so cold..',
imageUrl: imageUrl:
'https://www.skedaddlewildlife.com/wp-content/uploads/2018/09/depositphotos_22425309-stock-photo-a-lonely-raccoon-in-winter.jpg', 'https://www.skedaddlewildlife.com/wp-content/uploads/2018/09/depositphotos_22425309-stock-photo-a-lonely-raccoon-in-winter.jpg',
), ),
CardData( CardData(
'Hi', 'Hi',
descriptionText: 'pretty face', descriptionText: 'pretty face',
icon: Icons.hail, icon: Icons.hail,
imageUrl: imageUrl:
'https://www.thesprucepets.com/thmb/nKNaS4I586B_H7sEUw9QAXvWM_0=/2121x0/filters:no_upscale():strip_icc()/GettyImages-135630198-5ba7d225c9e77c0050cff91b.jpg', 'https://www.thesprucepets.com/thmb/nKNaS4I586B_H7sEUw9QAXvWM_0=/2121x0/filters:no_upscale():strip_icc()/GettyImages-135630198-5ba7d225c9e77c0050cff91b.jpg',
), ),
CardData( CardData(
'Orange', 'Orange',
@ -30,4 +30,4 @@ class MockRepository extends ApiInterface {
], ],
); );
} }
} }

View File

@ -43,4 +43,4 @@ class PotterRepository extends ApiInterface {
return null; return null;
} }
} }
} }

View File

@ -7,9 +7,9 @@ class CardData {
final String? imageUrl; final String? imageUrl;
CardData( CardData(
this.text, { this.text, {
required this.descriptionText, required this.descriptionText,
this.icon = Icons.catching_pokemon, this.icon = Icons.catching_pokemon,
this.imageUrl, this.imageUrl,
}); });
} }

View File

@ -5,4 +5,4 @@ class HomeData {
final int? nextPage; final int? nextPage;
HomeData({this.data, this.nextPage}); HomeData({this.data, this.nextPage});
} }

View File

@ -32,6 +32,3 @@ class MyApp extends StatelessWidget {
); );
} }
} }

View File

@ -0,0 +1,34 @@
import 'package:flutter/widgets.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:pmu/components/resources.g.dart';
abstract class SvgObjects {
static void init() {
final pics = <String>[
R.ASSETS_SVG_RU_SVG,
R.ASSETS_SVG_UK_SVG,
];
for (final String p in pics) {
final loader = SvgAssetLoader(p);
svg.cache.putIfAbsent(loader.cacheKey(null), () => loader.loadBytes(null));
}
}
}
class SvgRu extends StatelessWidget {
const SvgRu({super.key});
@override
Widget build(BuildContext context) {
return SvgPicture.asset(R.ASSETS_SVG_RU_SVG);
}
}
class SvgUk extends StatelessWidget {
const SvgUk({super.key});
@override
Widget build(BuildContext context) {
return SvgPicture.asset(R.ASSETS_SVG_UK_SVG);
}
}

View File

@ -12,7 +12,8 @@ class DetailsPage extends StatelessWidget {
return Scaffold( return Scaffold(
appBar: AppBar(), appBar: AppBar(),
body: Padding( body: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0), // Добавляем общий отступ слева и справа padding:
const EdgeInsets.symmetric(horizontal: 16.0), // Добавляем общий отступ слева и справа
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -38,12 +39,11 @@ class DetailsPage extends StatelessWidget {
Text( Text(
data.descriptionText, data.descriptionText,
style: Theme.of(context).textTheme.bodyLarge?.copyWith( style: Theme.of(context).textTheme.bodyLarge?.copyWith(
fontSize: 25.0, fontSize: 25.0,
), ),
) )
], ],
), ),
) ));
);
} }
} }

View File

@ -36,4 +36,4 @@ class HomeBloc extends Bloc<HomeEvent, HomeState> {
error: error, error: error,
)); ));
} }
} }

View File

@ -7,4 +7,4 @@ class HomeLoadDataEvent extends HomeEvent {
final int? nextPage; final int? nextPage;
const HomeLoadDataEvent({this.search, this.nextPage}); const HomeLoadDataEvent({this.search, this.nextPage});
} }

View File

@ -21,9 +21,9 @@ class HomeState extends Equatable {
@override @override
List<Object?> get props => [ List<Object?> get props => [
data, data,
isLoading, isLoading,
isPaginationLoading, isPaginationLoading,
error, error,
]; ];
} }

View File

@ -11,19 +11,19 @@ class _Card extends StatefulWidget {
final VoidCallback? onTap; final VoidCallback? onTap;
const _Card( const _Card(
this.text, { this.text, {
this.icon = Icons.catching_pokemon, this.icon = Icons.catching_pokemon,
required this.descriptionText, required this.descriptionText,
this.imageUrl, this.imageUrl,
this.onLike, this.onLike,
this.onTap, this.onTap,
}); });
factory _Card.fromData( factory _Card.fromData(
CardData data, { CardData data, {
OnLikeCallback onLike, OnLikeCallback onLike,
VoidCallback? onTap, VoidCallback? onTap,
}) => }) =>
_Card( _Card(
data.text, data.text,
descriptionText: data.descriptionText, descriptionText: data.descriptionText,
@ -108,14 +108,14 @@ class _CardState extends State<_Card> {
duration: const Duration(milliseconds: 300), duration: const Duration(milliseconds: 300),
child: isLiked child: isLiked
? const Icon( ? const Icon(
Icons.favorite, Icons.favorite,
color: Colors.redAccent, color: Colors.redAccent,
key: ValueKey<int>(0), key: ValueKey<int>(0),
) )
: const Icon( : const Icon(
Icons.favorite_border, Icons.favorite_border,
key: ValueKey<int>(1), key: ValueKey<int>(1),
), ),
), ),
), ),
), ),

View File

@ -10,6 +10,8 @@ import 'package:pmu/presentation/home_page/bloc/bloc.dart';
import 'package:pmu/presentation/home_page/bloc/events.dart'; import 'package:pmu/presentation/home_page/bloc/events.dart';
import 'package:pmu/presentation/home_page/bloc/state.dart'; import 'package:pmu/presentation/home_page/bloc/state.dart';
import '../common/svg_objects.dart';
part 'card.dart'; part 'card.dart';
class MyHomePage extends StatefulWidget { class MyHomePage extends StatefulWidget {
@ -41,10 +43,10 @@ class BodyState extends State<Body> {
@override @override
void initState() { void initState() {
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
context.read<HomeBloc>().add(const HomeLoadDataEvent()); context.read<HomeBloc>().add(const HomeLoadDataEvent());
}); });
SvgObjects.init();
scrollController.addListener(_onNextPageListener); scrollController.addListener(_onNextPageListener);
super.initState(); super.initState();
@ -87,32 +89,32 @@ class BodyState extends State<Body> {
BlocBuilder<HomeBloc, HomeState>( BlocBuilder<HomeBloc, HomeState>(
builder: (context, state) => state.error != null builder: (context, state) => state.error != null
? Text( ? Text(
state.error ?? '', state.error ?? '',
style: Theme.of(context).textTheme.headlineSmall?.copyWith(color: Colors.red), style: Theme.of(context).textTheme.headlineSmall?.copyWith(color: Colors.red),
) )
: state.isLoading : state.isLoading
? const CircularProgressIndicator() ? const CircularProgressIndicator()
: Expanded( : Expanded(
child: RefreshIndicator( child: RefreshIndicator(
onRefresh: _onRefresh, onRefresh: _onRefresh,
child: ListView.builder( child: ListView.builder(
controller: scrollController, controller: scrollController,
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
itemCount: state.data?.data?.length ?? 0, itemCount: state.data?.data?.length ?? 0,
itemBuilder: (context, index) { itemBuilder: (context, index) {
final data = state.data?.data?[index]; final data = state.data?.data?[index];
return data != null return data != null
? _Card.fromData( ? _Card.fromData(
data, data,
onLike: (title, isLiked) => onLike: (title, isLiked) =>
_showSnackBar(context, title, isLiked), _showSnackBar(context, title, isLiked),
onTap: () => _navToDetails(context, data), onTap: () => _navToDetails(context, data),
) )
: const SizedBox.shrink(); : const SizedBox.shrink();
}, },
), ),
), ),
), ),
), ),
BlocBuilder<HomeBloc, HomeState>( BlocBuilder<HomeBloc, HomeState>(
builder: (context, state) => state.isPaginationLoading builder: (context, state) => state.isPaginationLoading

24
makefile Normal file
View File

@ -0,0 +1,24 @@
gen:
flutter pub run build_runner build --delete-conflicting-outputs
hello:
echo "Hi!"; \
echo "I'm makefile"; \
echo "^_^"
icon:
flutter pub run flutter_launcher_icons:main
init_res:
dart pub global activate flutter_asset_generator
format:
dart format . --line-length 100
res:
fgen --output lib/components/resources.g.dart --no-watch --no-preview; \
make format
loc:
flutter gen-l10n; \
make format

View File

@ -22,14 +22,22 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.7.0" version: "6.7.0"
archive:
dependency: transitive
description:
name: archive
sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d
url: "https://pub.dev"
source: hosted
version: "3.6.1"
args: args:
dependency: transitive dependency: transitive
description: description:
name: args name: args
sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.5.0" version: "2.6.0"
async: async:
dependency: transitive dependency: transitive
description: description:
@ -134,6 +142,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.0.3" version: "2.0.3"
cli_util:
dependency: transitive
description:
name: cli_util
sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19
url: "https://pub.dev"
source: hosted
version: "0.4.1"
clock: clock:
dependency: transitive dependency: transitive
description: description:
@ -162,10 +178,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: convert name: convert
sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.1.1" version: "3.1.2"
copy_with_extension: copy_with_extension:
dependency: transitive dependency: transitive
description: description:
@ -186,10 +202,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: crypto name: crypto
sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27 sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.5" version: "3.0.6"
cupertino_icons: cupertino_icons:
dependency: "direct main" dependency: "direct main"
description: description:
@ -242,18 +258,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: file name: file
sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "7.0.0" version: "7.0.1"
fixnum: fixnum:
dependency: transitive dependency: transitive
description: description:
name: fixnum name: fixnum
sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.1.0" version: "1.1.1"
flutter: flutter:
dependency: "direct main" dependency: "direct main"
description: flutter description: flutter
@ -267,6 +283,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "8.1.6" version: "8.1.6"
flutter_launcher_icons:
dependency: "direct dev"
description:
name: flutter_launcher_icons
sha256: "526faf84284b86a4cb36d20a5e45147747b7563d921373d4ee0559c54fcdbcea"
url: "https://pub.dev"
source: hosted
version: "0.13.1"
flutter_lints: flutter_lints:
dependency: "direct dev" dependency: "direct dev"
description: description:
@ -275,6 +299,19 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.0.0" version: "4.0.0"
flutter_localizations:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_svg:
dependency: "direct main"
description:
name: flutter_svg
sha256: "8c5d68a82add3ca76d792f058b186a0599414f279f00ece4830b9b231b570338"
url: "https://pub.dev"
source: hosted
version: "2.0.7"
flutter_test: flutter_test:
dependency: "direct dev" dependency: "direct dev"
description: flutter description: flutter
@ -304,6 +341,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.3.2" version: "2.3.2"
http:
dependency: transitive
description:
name: http
sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010
url: "https://pub.dev"
source: hosted
version: "1.2.2"
http_multi_server: http_multi_server:
dependency: transitive dependency: transitive
description: description:
@ -320,6 +365,22 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.0.2" version: "4.0.2"
image:
dependency: transitive
description:
name: image
sha256: f31d52537dc417fdcde36088fdf11d191026fd5e4fae742491ebd40e5a8bea7d
url: "https://pub.dev"
source: hosted
version: "4.3.0"
intl:
dependency: "direct main"
description:
name: intl
sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf
url: "https://pub.dev"
source: hosted
version: "0.19.0"
io: io:
dependency: transitive dependency: transitive
description: description:
@ -456,6 +517,22 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.9.0" version: "1.9.0"
path_parsing:
dependency: transitive
description:
name: path_parsing
sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf
url: "https://pub.dev"
source: hosted
version: "1.0.1"
petitparser:
dependency: transitive
description:
name: petitparser
sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27
url: "https://pub.dev"
source: hosted
version: "6.0.2"
pool: pool:
dependency: transitive dependency: transitive
description: description:
@ -605,6 +682,30 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.3.2" version: "1.3.2"
vector_graphics:
dependency: transitive
description:
name: vector_graphics
sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3"
url: "https://pub.dev"
source: hosted
version: "1.1.11+1"
vector_graphics_codec:
dependency: transitive
description:
name: vector_graphics_codec
sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da
url: "https://pub.dev"
source: hosted
version: "1.1.11+1"
vector_graphics_compiler:
dependency: transitive
description:
name: vector_graphics_compiler
sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81"
url: "https://pub.dev"
source: hosted
version: "1.1.11+1"
vector_math: vector_math:
dependency: transitive dependency: transitive
description: description:
@ -653,6 +754,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.1" version: "3.0.1"
xml:
dependency: transitive
description:
name: xml
sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226
url: "https://pub.dev"
source: hosted
version: "6.5.0"
yaml: yaml:
dependency: transitive dependency: transitive
description: description:

View File

@ -1,96 +1,52 @@
name: pmu name: pmu
description: "A new Flutter project." description: "A new Flutter project."
# The following line prevents the package from being accidentally published to publish_to: 'none'
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.0+1 version: 1.0.0+1
environment: environment:
sdk: ^3.5.3 sdk: ^3.5.3
# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies: dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
# Виджеты
cupertino_icons: ^1.0.8
flutter_svg: 2.0.7
json_annotation: ^4.8.1 json_annotation: ^4.8.1
dio: ^5.4.2+1 dio: ^5.4.2+1
pretty_dio_logger: ^1.3.1 pretty_dio_logger: ^1.3.1
equatable: ^2.0.5 equatable: ^2.0.5
flutter_bloc: ^8.1.5 flutter_bloc: ^8.1.5
copy_with_extension_gen: ^5.0.4 copy_with_extension_gen: ^5.0.4
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons. flutter_localizations:
cupertino_icons: ^1.0.8 sdk: flutter
intl: ^0.19.0
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
build_runner: ^2.4.9 build_runner: ^2.4.9
json_serializable: ^6.7.1 json_serializable: ^6.7.1
# The "flutter_lints" package below contains a set of recommended lints to
# encourage good coding practices. The lint set provided by the package is
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^4.0.0 flutter_lints: ^4.0.0
# For information on the generic Dart part of this file, see the flutter_launcher_icons: 0.13.1
# following page: https://dart.dev/tools/pub/pubspec
flutter_icons:
android: "ic_launcher"
ios: true
image_path: "assets/launcher.jpg"
min_sdk_android: 21
# The following section is specific to Flutter packages.
flutter: flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true uses-material-design: true
generate: true
# To add assets to your application, add an assets section, like this: assets:
# assets: - assets/svg/
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/to/resolution-aware-images
# For details regarding adding assets from package dependencies, see
# https://flutter.dev/to/asset-from-package
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/to/font-from-package